This episode of The Simpsons shows that after 22 years it might be time to end the show. It still gets huge numbers, but at some point you have to realize the quality is so diluted that it ruins the legacy of the cartoon.
Katy Perry was not bad at all in her appearance, and there was strong writing with a few zingers by the "puppets" as well.
This was just not a funny episode of The Simpsons, and was too all over the place and nonsensical with all of the dreaming and flashbacks and whatnot. Just not a good ep.