Really depends on the model.
This Sonata was the 2006-2008 model
» Click to show Spoiler - click again to hide... «
This Sonata is the 2009-2014 model
» Click to show Spoiler - click again to hide... «
As you can see the 2006 model heavily influence by Japanese carmakers and looks similar to that era's Accord, while the current generation they're on their own path design wise and their own engines are in the 3rd or 4th generation. Although still a way to go before matching Japanese car makers the strides are huge. They've been able to plug the emissions and fuel economy part but performance wise still not there yet but it is getting better.
The Spectra isn't a 5 year old car, probably the last unit they sold are 5 years old but the technology they based it on is at least from 15 years ago. Let's look at the crash test performance.
2006 Kia Cerato terrible results but as expected from a still growing car maker but
2012 Kia Ceed (Cerato in Malaysia) scored full marks 5/5 stars, a big difference in only 6 years. So which is why I don't recommend older Koreans as their engine performance is below par for the fuel they burn which means higher fuel cost and also safety wise is night and day.
2004 Kia Picanto is like a death trap, the test was with side impact airbags along with driver and passenger airbags (all of which I think are missing from the ones sold here) then with all those bags it only barely score enough to be road worthy.
So what's your budget again? I'll think of the best for what you can afford.
Ideally 25-30k in cash. Looks like Korean cars are out of the equation since the newer ones are out of my budget and the old ones are not quite up-to-par.