2003 Honda Accord Hesitating and check engine light on

The car is my wife’s and we just got married in July, so I’m not aware of the maintenance history. She says that she has been taking it to the dealership for all maintenance. Whenever they have told her to do something, she lets them do it. However, I don’t think they kept up with it very well considering they had never had her change her tires in six years, and the belt and battery were way passed due when I had met her. (Actually, they did finally tell her to change her tires the week after we had them replaced.) I think I’m going to check the basics such as plugs, throttle body, exc. I’ll also spray out the sensor, take it to muffler shop, or check the wiring in order of cheapest and easiest solutions. Thanks for all the advice. I post back with the results.