Another thing.
Leia could have been in communication with the Rebel base while they were en route.
Leia = I've got the plans, but I think this ship is being followed.
General = Come in. If they lose you they'll probably start blowing up planets at random to get us to attack. Most of our fighters can't go into hyperspace, so we'll be stronger if we fight them here.