In my point of view getting the cake in level 1-25 isn't that easy and the possibility of failure quite high.
I used the first level 1-1 to get this achievement. Just use the magnet and finish the level. It is almost impossible to miss this way.
(to get the magnet and the cakes you need to progress to the second tier of levels "Rise and Swine" and feed the King Pig with cakes until he drops a magnet).