I don't think it's meant to be offensive.
It's "smell" in the same sense as "something smells fishy here", or "I smell trouble", with smell serving the analogy of being the least specific of your senses, alluding to having a non-specific feeling rather than hard evidence about something. In theory there's no implication of a "repulsive / offensive smell" or "ew this code smells" in the phrase, like you seem to perceive it.
Granted, these things are subjective, but it's similar to complaining about the term black humour being racist, when black in this context is not meant to have any racial context.