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.
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.