re factored add plugin page to new js format