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

This PR includes commits for #9 and #10.


Why not use Mock here instead of creating a class ?