[RFR] [Plugin] Create plugin engine on Php side for JS #10 #9

This PR includes commits for #9 and #10.


agree, but for consistency it's better. I see a lot of Exception with messages inside a sprintf calls.

Also, performance is out of scope when we throw an Exception and stop the current script.