It was not a "developed country" feeling everywhere. But it felt safe and welcoming everywhere we went. For example, I don't recall seeing bars on windows outside of the capital. And every local who we interacted with was polite and honest. When out shopping and eating at local places, we never found we ended up with something like a "tourist menu" or something with higher prices.
An anecdote, one woman who I was with forgot her smartphone at a roadside restaurant. A quick call and a drive back and the phone was returned without any fuss.
youtube has lots of travel videos around Costa Rica if you are interested. https://youtu.be/baXO0hC2GVg
I've definitely felt less safe in many parts of the U.S.
No idea how is it today, it may be a lot better.
If a normal tourist only sees the blocks around the Ticabus bus station at 11pm and the blocks around the bus stop to their tourist destination then of course it's an ugly city.
However the Escazú, Sabana and San Pedro neighbourhoods are quite nice.
The downtown is functional (while not beautiful), compared to any other of the Central American capitals.
And the downtown main street has wide sidewalks for walking (unlike San Salvador), grid style streets (unlike Tegucigalpa), nice weather (unlike Panama), government offices, hotels, nearby (unlike all the others), and accessible by public transport.
https://www.statista.com/statistics/984826/homicide-rate-cos...
https://www.sfchronicle.com/crime/article/Homicides-are-up-3...
Safety is highly situational, and it depends a lot on the way crime happens. If it's criminals killing criminals (e.g. gangs), ordinary citizens and visitors might be fine. But if there is a lot of opportunistic crime, a foreigner might be a target.