Use $this->app instead of $app
Fixed exceptions
Use $plugin->getName()
Use getName method for all plugins