[feature] - plugin.middleware works with [function(core){...}] or function(core){...}