<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def valid_web_plugin(self, plugin):
 """ Validate a web plugin, ensuring it is a web plugin and has the necessary fields present. `plugin` is a subclass of scruffy's Plugin class. """

        if (issubclass(plugin, WebPlugin)      and
            hasattr(plugin, 'plugin_type')      and plugin.plugin_type == 'web' and
            hasattr(plugin, 'name')             and plugin.name != None):
            return True
        return False