After helping Dr. Doofenshmirtz rebuild his "Otherdimensionator," Phineas and Ferb find themselves in an alternate universe where they discover Perry is a spy and an evil Dr. Doof exists with plans to rule over the Tri-state areas of both dimensions.