def plugins_by_name(pm):
    """
    Organize plugins by plugin name.

    Returns a dict where the key is the plugin name and the value is a list
    of all plugins that have that name.
    """
    plugins = {}

    for plugin in pm.plugins:
        if plugin.name not in plugins:
            plugins[plugin.name] = []
        plugins[plugin.name].append(plugin)

    return plugins