I know there's folks here who are great at math and can numerically optimize what you should do, especially if you're aiming to raise the average pet level of your collection on WCP. But IMO, you should do it in whatever way makes sense to you. Some people don't like seeing a lot of level 1s in their collection. In that case, level a whole lot of 1s at a time. Other people want to see as many 25s as possible. In that case, aim to max out each pet before going to the next.
If I recall, when I started working on leveling my entire stable, I set smaller, frequent goals for myself, i.e. get all level 1s to level 4, get all to level 9. Once I got to about that point I'd then focus on two or three each day and push them to 25.