code: def valid_web_plugin(self, plugin):
          
          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
docs: 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.