code: def valid_view_plugin(self, plugin):
          
          if (issubclass(plugin, ViewPlugin)      and
              hasattr(plugin, 'plugin_type')      and plugin.plugin_type == 'view' and
              hasattr(plugin, 'name')             and plugin.name != None and
              hasattr(plugin, 'view_class')       and plugin.view_class != None):
              return True
          return False
docs: Validate a view plugin, ensuring it is a view plugin and has the
          necessary fields present.
  
          `plugin` is a subclass of scruffy's Plugin class.