You'd need to give much more information about the bike before anyone can answer that. If you can move to a more powerful motor you may well need to upgrade the battery and controller as well.
If you do, it will no longer be legal to ride on the road unless you register it, get insurance, etc; and also not legal to ride off road in public places (bike paths, towpaths, bridleways, etc). Theoretical penalties are high; but risk of being caught if you still ride sensibly very low (and pretty low even if you don't ride sensibly).