Plot hole: Plankton replaces the secret formula with another message in a bottle, but later, when Spongebob catches him, he is replacing the bottles again.
Suggested correction: No, he is not. It might appear like he's about to do it due to the way Plankton and the bottles are similarly positioned as in the shot mentioned before, but there is nothing that indicates that he was about to repeat the same action. He had only picked up the bottle with the secret formula that he had pushed off from the pressure plate, he was then surprised to be caught by Spongebob so he accidentally knocked over the bottle he replaced the secret formula with. Also, when he accidentally knocked over the bottle, he didn't place the bottle he was holding on to back on top of the pressure plate to disable the alarm since it would mean returning the bottle with the secret formula back to its original spot.
Also, when it shows it when it happens about a few days or so ago, he doesn't knock it over.