Leia was a Sith Lord
The First Order were able to track them through hyperspace because Leia was telepathically transmitting their location to Kylo.
Kylo didn't shoot Leia, because they were secretly allies.
Leia flew through space because she was a Sith Lord.
Leia had Poe demoted because he was becoming too effective and single-handedly took out a dreadnoughts defenses.
Snoke was just a reainmated puppet being controlled by Leia.
Her ultimate goal was to kill Luke, and she succeeded.