Your hippothetical cadet would get a medal, maybe even a honorary rank, but no way would he become a captain of a carrier.[
When is saving the Earth not considered significant? That's a Herculean feat right there. He helped plan an attack, coordinated the crew, got his ship ready in no time.
I honestly think there's a huge disconnect between being a viewer and being an actual character in the movie, t to the point where 40 years of Trek have desensitized us to a degree. We the viewer can sit back and make judgement calls, sure. But if a cadet saved the modern-day US from nuclear annihilation, we would never stop giving him accolades and promotions. Not to demean Capt. Sully Sullenberger, but he got a ton of attention and was praised as a national hero for landing a plane, to give the topic some perspective. If any one of us was an actual high ranking member of Starfleet, we would give Kirk the moon if he wanted (Thank goodness old Spock told him to be captain instead).
On the side, Riker was offered command of the Drake right after he became XO at the age of 29. He would have beat Kirk Prime's record of youngest captain by two years.
But Riker still had to go through the ranks, no shortcuts.
Show me an historical precedent where a cadet achieved similar results on a similar scale but was given only a medal and then I'll agree.