My favorite companions by ranking:
1)
Leela - You need to ask?

Kidding aside, despite being the sexiest thing onscreen, Leela was smart, tough, and a perfect compliment for the Doctor.
2)
Romana II - Have not watched Mary Tamm yet, so I only have the lovely Lalla Ward to go on. Personally I think it was a brilliant stroke to have one of the Doctor's own race accompany him. As it allowed for some playful banter to pass between them.
3)
Sarah Jane Smith - While I don't rank her as my all time favorite like many do, there's no denying what a wonderful presence she was on the TARDIS.
4)
Martha Jones - While she came after Rose, whom I rank highly as well, Martha gets extra points for being smarter, and a much stronger character personality wise.
5)
Rose Tyler - Smart, feisty, and cute as hell. Rose may have been just an ordinary shopgirl, but she was more than that to the Doctor, and to many of us as well.
6)
Charley Pollard - From the Eighth Doctor audio adventures. Charley was very much like Rose, albeit a bit more reckless and standoffish.
7)
Jamie Mcrimmon - One of the few male companions worth mentioning IMO. The kind of guy you'd want watching your back in a fight.
8)
Jo Grant - One word: HOT.
9)
K-9 - Can't forget about the dog now, no?
10)
Ian Chesterton - In my opinion, Ian was the most in control among the first group who traveled in the TARDIS (the Doctor included, as he was pretty much an irritable old man early on).