Maybe you never wanted the source code for those plugins to become free
software because they were never meant to be and fit a specific purpose that
the client paid for.
The software should be free. Period. Your client, like anybody, deserves the
four freedoms. You prefer to be the mighty developer that is the only one who
can fix the bugs, implement new feature, maybe artificial usage restrictions,
spy on the user or even use her system as part of a botnet (Who knows? Only
you. Not the user). This simply is unethical.
now your code can be stolen and shared.
The code should be freely sharable. Period. That is part of the free software
definition. Besides, if your plugins "fit a specific purpose that the client
paid for", then why would this client share them? Or do you mean "share them
with another developer who will fix the bugs you let in and the features that
were still to be implemented"? If so, it just emphasizes the unethical
control you want on your users. Users deserve a free market for support. It
is *their* jobs that is achieved through software. They deserve the control
on their computing. Not you.