Remember some of the warlords Especially Doflamingo were shown to be the equal of the Commanders of Whitebeards army.

So going from Beating Doflamingo, to Beating a Yonko Commander isn't really much of a Jump at all.
Yeah, one could say its not a jump at all.
Or at least one thats impossible to measure. Because the quality of Warlords swing so widely.
And Flamingo was both ½ dead from Law's gamma knife, and holding up the Birdcage.

Though also must agree i did think the birdcage was utter BS.
It was a plot device, not a power Flamingo should have had.
Oda is generally good with his power Scaling, but he dropped the ball here.

It should have been possible for the likes of Zorro to cut parts of it.
He just had to be to wounded/exhausted from something to save the town himself.