Continuity mistake: When we see the "Flabby Patty" for the first time, there are 8 fish in line. When we see it the second time, there is only 5.
Continuity mistake: When SpongeBob scrambles into the Krusty Krab to tell Mr. Krabs the "good news", the doors swing wildly inward. When the two return outside and see the Flabby Patty, the doors have varied from being open inward, to being open outward.
Continuity mistake: SpongeBob is holding a picture of Plankton and Mr. Krabs, then when he pulls Plankton and Mr. Krabs together, the picture disappears.
Answer: I believe this is the Season 6 episode "Spongicus".