In my opinion the ww is generally a better pvm pet, while the dragon is a better pvp pet, except in pvm situations where you are specifically matching damage to resists. In close melee the ww is much stronger and does much more damage than a dragon (I don't care what the numbers say, in general if you match a dragon with a ww, all things, such as training, being equal, the ww will eat the dragon for lunch).
However, in pvp the dragon is faster, and it's resists match up very well with the most used attack spells, and the most common damage from weapons, and it doesn't have the single glaring weakness that a ww does. It also has it's breath which is just wicked in pvp, as long as you keep your dragon well healed. It also has more hit points than a ww.
As I've said as many times as I've gotten the chance, in my opinion the dragon is second only to the rune beetle in pvp, and in some situations is actually better. As has been said before many times, tamers that are more advanced will generally learn to match the pet to the context. That is one of the reasons why stable space is always at a premium, and very often hard decisions have to be made as to which pets to keep, and which to let go.
You will even find that pets of the same species, with different strengths and weaknesses will be better for different things. It has long been my contention that for pvm hits and resists are critically important, while for pvp the stats (str, dex, int), and for rune beetles poisoning and evaluate intelligence, are more important. However, even there, different pvp situations will be best entered into with pets that match their strengths to the context.