Add $plugin_name arg and replace hardcode vars