Shrek 4 comes roaring back after nearly destroying it's reputation in #3. IV is punchy and funny, and had a great plot, largely leaving behind the twisted fairy tale themes that worked so well in 1 and 2, but got tired by 3, and striking out on a solid and thoughtful action story. Rumpelstiltskin is the most memorable and funniest Shrek villain so far.
Two notes: The witches are somewhat more menacing than anything yet seen in the Shrek world, and be prepared to think about and explain what an "alternative time line" is if you have a 5 year old.