Ok the success of a spell/operation does not depend on asingle factor.
You have to consider the grade of the op, the number of agents/wizzards u use, the ratio NW/number of agents or wizzs of yours compared to your opponent (normaally a bigger target has a lower proportion because he has to build a shitload of agents/wizzs to make a good defense, so if you are small with no other fleet than agents or wizzs your chances will be higher). Your race bonus will be considered also (partaxian power) and finally theres 1 out of 7 chances of a random fail.
The grade of ops/spells is as follows:
Spells grade1 (easy) -> vision, space amazemen, find target planets, reduce food
Spells grade2 -> destroy iron, no fear, warcry, destroy scientists
Spells grade 3 -> estorms, octarine hurricane, create portal force field
Spells grade 4 -> hypno
Ops grade1 -> spy on target, check relations, plant false info
Ops grade2 -> kill scientists, planet infraestructure, investigate portal
Ops grade3 -> infiltration, sabotage portal
Ops grade4 -> plant nukes, destroy cash
Not sure i am forgetting some op, its been a while since i aint playing, but hope it helps