I never ate a pudding in America, never been there! cupcakes are cupcakes everywhere, same stuff kind of. Cupcakes are a cake, solid stuff then.
So, by the looks of "dirty pudding" recipes and pics from search hits, I can hazard a guess.
Seems as it having to get some pudding in it and something more, oreos, some cookies made into crumbs etc. Such crumbs would be the "dirt", if I get it right.https://www.google.com.br/search?q=DIRT ... 4&dpr=1.25
With such yummy things, kids´ clothes will get dirty for sure!
As a token, here goes a related proverb, though the dirty really means dirty:
"A hungry dog will eat a dirty pudding."
Something like "o tempero da comida é a fome."