Update plugins.js

Move instantiation outside of for loop