I took benchmark values for CPUs and GPUs from the Internet and converted them down to a scale from 0 to 100.
Based on this score, you can automatically set graphics settings or calculate the hardware requirements.
You should create a fallback if the hardware is not recognized. If your CPU or GPU is not found then please contact me with the name of the CPU/GPU from the "Get Hardware Info" function that was not detected so that I can add it.