Lisa feels her status as top student in the class is threatened when a new student named Allison Taylor arrives at Springfield Elementary. While Lisa initially admires having another 8 year old who matches her intellectual prowess, she becomes shocked upon learning that in fact Allison is a year younger than her and had been skipped ahead from the 1st grade in addition to which she is also an aspiring saxophone player.
Lisa tries to befriend her, though she battles her envy and fears that she will lose her purpose. At a band practice, the two girls end up in a saxophone duel that results in Lisa passing out from over-exertion. Their rivalry comes to a head during Springfield Elementary's annual diorama building competition. Allison constructs a scene from "The Tell-Tale Heart", by Edgar Allan Poe. Lisa goes to great efforts to produce a better diorama, a scene from Oliver Twist, but it is immediately destroyed by an electric fan that Lisa utilizes, along with fake snow, to simulate a "bitter snowstorm". Bart decides to intervene and help Lisa sabotage Allison's entry so she can win. On the day of the diorama contest, he distracts the other students with his own demonstrations to give Lisa time to switch Allison's entry with one containing a cow's heart. After Principal Skinner chases Bart away, he discovers the cow's heart in the diorama and proceeds to humiliate Allison in front of the entire school. Soon Lisa's conscience intervenes and she produces the real diorama.
However, Skinner is unimpressed by both Lisa's and Allison's work and declares Ralph Wiggum's collection of Star Wars action figures to be the winner. In the end, Lisa and Allison put aside their differences and become friends as they walk off into the sunset, picking up Ralph along the way after he accidentally trips and breaks his action figures.
The episode's subplot follows Homer after he encounters and then steals hundreds of pounds of sugar he finds at the site of Hans Moleman's truck accident. Homer decides he can get rich by selling the sugar door-to-door. He keeps the sugar in a pile in his back yard, where he obsessively guards it from thieves. Soon, the sugar attracts bees from a local apiary. The beekeepers track the swarm down and offer to buy the bees back from Homer for $2,000. Before the transaction can be completed, however, it begins to rain, dissolving the sugar; the bees fly away, leaving Homer without any money or sugar.