What are the factors that a doctor uses to determine the risk a patient faces having valve replacement surgery?

Many things. The risk depends on how severe the valve disease and wht the patient's other risk factors are. Age and the presence of other diseases would need to be evaluated to determine the total risk. Things like kidney disease, lung disease, smoking, other vascular disease, diabetes, hypertension would all increase the total risk to the patient.
Several. There needs to be a proper indication from history, physical exam and echo testing and cath. Then one assesses all other history and risks: smoker, diabetic, obese, age, frailty etc. The sts has some large comparative databases as well.