G1 Megatron has the worst by far. He's supposed to be this intergalactic villain and the leader of the Decepticons, and he transforms into a handgun. And what's more, this requires shrinking to such a ridiculous extent that it's completely unbelievable.
If you ask me, that's far more stupid than a city-transforming autobot. I'm also compelled to point out that in the anime series Super Dimensional Fortress Macross, the Macross is transformable and also contains a city within itself. They designed things so that people could live there comfortably in areas not usurped by the transformation. So Transformers didn't do it first, and it's not impossible to do it in a credible way.