plugin activation logic