At the Springfield Nuclear Power Plant, Homer is eating doughnuts. One of them splatters onto the nuclear reactor core's temperature dial, which is nearing the red zone. Homer fails to see the warning and the plant approaches a nuclear meltdown. He seems to be the only person who can stop it, though he has no skills and cannot remember any of his training (due to being distracted and occupied with a Rubik's Cube at the time). In desperation, he chooses a button at random with a counting rhyme, which miraculously averts the meltdown. Springfield is saved and Homer is hailed as a hero. Mr. Burns names Homer "Employee of the Month". Homer's family is also proud of him, especially Lisa, who starts to see him as a role model. Meanwhile, Homer himself is troubled by the fact that his so-called heroism was nothing but luck, and his gloomy mood deepens when he receives a congratulatory phone call from Magic Johnson, who tells Homer "People like that are eventually exposed as the frauds they are".
Burns introduces Homer to Aristotle Amadopoulos, the owner of the nuclear power plant in Shelbyville, Springfield's neighbor town. Amadopoulos wants Homer to give a pep talk to his plant's lackluster workers. Homer is hesitant to accept, but Burns forces him into it. At the Shelbyville plant, he gives a fumbling motivational speech. Suddenly an impending meltdown threatens the Shelbyville plant. Amadopoulos and Homer go to the control room, and Amadopoulos asks Homer to avert the meltdown. In front of everyone, Homer repeats his rhyme and presses a button blindly. By luck, he again manages to avert a meltdown. Amadopoulos thanks Homer for saving the plant, but angrily berates him for his stupidity. Soon the phrase "to pull a Homer", meaning "to succeed despite idiocy," becomes widely used and is entered into the dictionary.
In the subplot, the relationship between Bart and his friend Milhouse has changed. On the bus ride to school, Bart is upset to discover that Milhouse had held a birthday party without inviting him. It turns out that Milhouse's mother, Luann Van Houten, thinks Bart is a bad influence on Milhouse and has banned him from seeing Bart, a decision Milhouse is downbeat about but makes no effort to defy. Suddenly deprived of his friend, a depressed Bart resorts to playing with Maggie. When Marge finds out about the situation, she decides to visit Luann. Marge admits that Bart is a "bit of a handful," and she explains that he and Milhouse are best friends and only have each other, so she asks Luann to allow the boys to play together. Later, Milhouse invites Bart over to his house, and Bart thanks Marge for standing up for him.