rename `plugin` to `middleware`