• I have a number of custom plugins that are not published in the WordPress.org plugin directory. These have “Required by” and “Requires” in the plugin headers that work correctly as far as I can see.

    With the release of PCP 2.1.0 a new warning is showing.

    Warning
    – plugin_header_requires_plugins_not_in_directory
    – The plugin declares “xxxx-xxx” as a required plugin, but it could not be found in the WordPress.org plugin directory

    Whilst the statement is technicaly true it is misleading as it implies that there is an issue with the “Required by” action.

    1. Instead of “plugin_header_requires_plugins_not_in_directory” it would be better to report a new Warning Code of “plugin-not-found-in-WordPress.org-plugin-directory” for ALL custom plugins. The message could contain details such as “The plugin header declares “xxxx-xxx” as a required plugin”
    2. If the required plugin is not found within the WordPress server being tested then a Error Code of “plugin_header_requires_plugin_not_found” would be better to indicate an actual problem.

    Maybe I have misunderstood what I am seeing and I do need to fix something – so please let me know.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Nilambar Sharma

    (@nilambar)

    Hi,

    When a plugin’s “Requires Plugins” header includes a non-existent plugin slug (in WordPress.org plugins directory), such as non-existent-plugin-slug, the release of a new version of that plugin is blocked on WordPress.org. This dependency is therefore problematic and it is marked as ERROR in Plugin Check.

    Thanks,

    Thread Starter jim5471

    (@jim5471)

    Hi Nilambar,

    Your answer doesn’t address the issue. I am talking about custom plugins that will never be uploaded to WordPress.org plugins directory. The present Warning message is misleading as it doesn’t consider this use case. Please consider my two proposals.

    Plugin Support Nilambar Sharma

    (@nilambar)

    Thanks for clarifying. To be precise about what this check does: it queries the WordPress.org plugin directory API (api.wordpress.org/plugins/info/1.0/{slug}.json) to see if the declared slug exists there — it does not check whether the required plugin is installed/active on the site running Plugin Check. So there’s no “actually missing on the server” state for this check to distinguish; that’s a separate concern outside its scope.

    For custom/private plugins that intentionally require other non-WordPress.org plugins, this warning is expected and can be safely ignored — it’s just flagging that the dependency isn’t verifiable against the public directory, not that anything is broken. We could look at rewording the message to make that distinction clearer. Please file issue with your suggested wording so that we can discuss and finalize the message. https://github.com/WordPress/plugin-check

    I’m having the same issue: a custom/non-dot-org plugin that requires other custom/non-dot-org plugins.

    I realize that this is only a warning and I can disregard the warning. But I’d like to silence it.

    I’ve tried adding

    <rule ref='WPPluginCheck'>
    <exclude name='PluginCheck.plugin_header_requires_plugins_not_in_directory' />
    </rule>

    to my plugin’s phpcs.xml file but that doesn’t seem to silence the warning.

    Any help with how to silence the warning much apprecieated.

    ah, finally figured it out.

    wp plugin check ... --ignore-codes=plugin_header_requires_plugins_not_in_directory

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.