WordPress.org

Making WordPress.org

Opened 10 months ago

Last modified 5 months ago

#3126 new enhancement

Show whether plugins include WP-CLI commands

Reported by: schlessera Owned by:
Milestone: Priority: normal
Component: Plugin Directory Keywords: close 2nd-opinion
Cc:

Description

For people managing large numbers of sites, the availability of WP-CLI commands might be a determining factor in picking the right plugins.

I would like to look into adding that information to the plugin directory, in the form of a simple flag or icon for every plugin.

Detecting the presence of integrated WP-CLI should be pretty straightforward, by just checking for the presence of the WP_CLI::add_command string.

Later on, we could even think about how to filter the search for these plugins as well, but just having the information be available should be a first achievable goal.

Change History (8)

This ticket was mentioned in Slack in #cli by schlessera. View the logs.


10 months ago

#2 @obenland
6 months ago

  • Keywords close 2nd-opinion added

Feature flags are a slippery slope. I'm not sure that is the best direction for the Plugin Directory to go.
I'd suggest encouraging plugin authors to use a tag instead, like wp-cli.

#3 @schlessera
5 months ago

Do you think it would at least make sense to fetch this information when populating the plugin repository and store it alongside the plugin so that it could be used within searches?

I agree that a convention about using a tag would be an easy and clean solution. However, in my experience, self-tagging produces somewhat random results, with some people forgetting the flags, some people using the wrong one, etc...

The presence of WP-CLI commands is something that can be easily and reliably detected by grepping the source code.

This would be one missing piece of the puzzle to replacing the discovery mechanism of the now deprecated WP-CLI Package Index.

This ticket was mentioned in Slack in #meta by obenland. View the logs.


5 months ago

#5 @Ipstenu
5 months ago

Tags and flags have proven to be both unmanageable and unreliable at scale. We have enough issues with people not editing the tested up to, etc. This would, sadly, be 'one more thing' they would forget to do.

Do you think it would at least make sense to fetch this information when populating the plugin
repository and store it alongside the plugin so that it could be used within searches?

That's an interesting question, but at the moment we're only scanning the readme.txt (which would mean we have this like we have PHP versions and tested up to) and that is, again, hit or miss.

Scanning all files of a plugin when updated for WP_CLI::add_command seems like a nice wish-list item, but possibly impractical at the moment? If it's not, then that would be the way to go. Automated!

This ticket was mentioned in Slack in #meta by obenland. View the logs.


5 months ago

This ticket was mentioned in Slack in #meta by obenland. View the logs.


5 months ago

#8 @tellyworth
5 months ago

@schlessera can you outline exactly what problem this would solve, how it would help users, and what it would look like?

It's an interesting idea, but we need a more solid and pragmatic reason than "because we can".

Note: See TracTickets for help on using tickets.