Things that can help with matching into a competitive residency program:
- Grades in medical school especially third year but everything counts.
- Scores on USMLE Step I (two doesn't matter that much)
- Letters of recommendation from department chair of specialty that you want to enter.
Things that make little difference in residency selection if you don't have the above:
- Research
- Activities in medical school
Things that don't matter at all:
- Race
- Ethnicity
- Medical School attended
If you want doors to open for you, post a AOA (Alpha Omega Alpha), have excellent grades and a very strong USMLE Step I score. If you don't have these things then you need to make sure that you have strong letters (definitely NEED one from the department chair) and you may need to do an audition rotation at the program that you want to enter and be ready to do extremely well.
A strong graduate from a "lesser" ranked medical school will go further than a weak graduate from a "higher" ranked medical school. I can tell you that we screen our residency applicants based on USMLE Step I first, grades second and then look at other things. We can only interview 75 people for 3 categorical slots. We generally rank everyone that we interview.
If your medical school is Pass/Fail, your USMLE Step I score become more important. We don't care about Step II unless you fail (which will result in a low ranking if we have interviewed you) and we will offer an interview to anyone who does a visiting clerkship with us and will rank them highly if they do a good job.
Research is of very minor importance unless it's groundbreaking because most medical students are not able to produce anything that is of substance between years.
In short, we want people who can get the job done and have shown by their achievements academically and clinically, that they can pass boards and have a strong work ethic.