Scenario: As a software developer I create a WordPress extension that does x which I sell for, let's say, $20. When buying it's clearly mentioned you are only allowed to install it on a single website.
When you install it on your website and try to run it for the first time you are asked to enter your license key and accept, by ticking a box, that if you use it without a proper key or use it on multiple websites with a single key you will be taken to court and have to pay me $5000 plus attorney fees for each unlicensed install.
Question: Is this legal? Is it enforceable?