Yeah, I'd agree with that. I've lived in both. This is not to say that parts of London aren't dodgy, but SF is I think both subjectively and quantifiably worse.
For example, London has around 500 people sleeping rough each night. San Francisco has almost ten times as many, between 3-5,000 (mainly because a winter's night in SF is rather more survivable than a London one).
More subjectively, I think public transport in London far surpasses SF, both in terms of safety and quality (...Friday nights excepted, but I think that's par the course of any large city).