At the end of each campaign mission, you get to see the statistics screen, which includes a cumulative score and a rank. How is the score calculated and how does it affect the rank?
From classic.battle.net, we get the following:
You get points for winning the scenario and for killing units.
These point values are then added to get a rank per the following: