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

This PR includes commits for #9 and #10.


ping @ndufreche.