Brown.
What can I say? He did a remarkably good job of addressing the 2008 crisis... not just domestically, but on the world stage. He did his national service, taking a pounding (not least from himself, one suspects) for the crumbling of his career under the immense pressure of the financial crisis.
Quite. So for me the answer is Brown, and not really "by default". He certainly had a number of flaws as a politician, but given the context of the time I think he did quite a good job as PM.
The ranking probably then goes
Callaghan
Blair
Major
(big gap)
May
Th*tch*r
Cameron
The Blair governments did achieve a fair amount, but I've always felt that given their majorities they should have achieved more, and then there's a certain four letter word ending in Q. I also just don't like him (and never have).