WordPress / plugin-check

A repository for the new Plugin Check plugin from the WordPress Performance and Plugins Team.
https://wordpress.org/plugins/plugin-check/
GNU General Public License v2.0
240 stars 46 forks source link

Check upgrade notice in plugin readme #392

Closed ernilambar closed 3 months ago

ernilambar commented 8 months ago

If readme file has upgrade notice is longer than 300 characters then WARNING will be shown.

ernilambar commented 8 months ago

cc: @swissspidy @felixarntz @mukeshpanchal27

mukeshpanchal27 commented 8 months ago

Is this related to plugin requirements? If so, could you please provide the URL? I couldn't find it in the legacy-plugin repository.

ernilambar commented 8 months ago

I took reference from official readme file. https://wordpress.org/plugins/readme.txt & https://developer.wordpress.org/plugins/wordpress-org/how-your-readme-txt-works/

== Upgrade Notice ==

= 1.0 =
Upgrade notices describe the reason a user should upgrade.  No more than 300 characters.
mukeshpanchal27 commented 8 months ago

Per WP directory plugin list there is more then 30k+ plugins that have Upgrade Notice section. Note entirely sure but it's not official requirement for the plugin. I would like to know @felixarntz and @swissspidy though on this. Thanks!

The current approach pass for this upgrade notice 🤔

Plugin: Redirection

== Upgrade Notice ==

= 5.4 =
* You may need to configure the IP header option if using a proxy

= 3.0 =
* Upgrades the database to support IPv6. Please backup your data and visit the Redirection settings to perform the upgrade
* Switches to the WordPress REST API
* Permissions changed from 'administrator' role to 'manage_options' capability

= 3.6.1 =
* Note Redirection will not work with PHP < 5.4 after 3.6 - please upgrade your PHP

= 3.7 =
* Requires minimum PHP 5.4. Do not upgrade if you are still using PHP < 5.4

= 4.0 =
* Alters database to support case insensitivity, trailing slashes, and query params. Please backup your data

= 4.7 =
* Requires minimum PHP 5.6+. Do not upgrade if you are still using PHP < 5.6

= 4.9 =
* Alters database to support enhanced logging. Please backup your data
swissspidy commented 8 months ago

Per WP directory plugin list there is more then 30k+ plugins that have Upgrade Notice section. Note entirely sure but it's not official requirement for the plugin. I would like to know @felixarntz and @swissspidy though on this. Thanks!

Correct, having a section itself is not a requirement, but if there is one provided, the example readme suggests using max 300 characters.

This is probably more a question for the plugin review team, though upgrade notices are not really a thing on initial submission, so it won't really apply there.

The question also is whether this 300 character limit is still correct and enforced.

The current approach pass for this upgrade notice

@mukeshpanchal27 I think the 300 characters limit is per upgrade notice per version, not for the whole section.

From what I can see this change here only looks at the first notice, not each of them individually. So that would need to be improved in the PR to make it more robust.

ernilambar commented 8 months ago

PR updated.

ernilambar commented 8 months ago

@foosantos Will this be worth adding to the check? It is not useful for the initial plugin submission though. But could be helpful when the plugin is updated.

foosantos commented 8 months ago

Hi @ernilambar — I'm going to check with the team on this one. Thanks for working on it.

foosantos commented 7 months ago

cc @bordoni

bordoni commented 7 months ago

Tests are failing on 8.1, lets get that resolved. But yest, I like that change.

davidperezgar commented 3 months ago

Since it's a WARNING, I don't see a problem and suggest developer to make best practices. I have checked the interface and is working correctly. For me it's OK!

github-actions[bot] commented 3 months ago

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: ernilambar <rabmalin@git.wordpress.org>
Co-authored-by: swissspidy <swissspidy@git.wordpress.org>
Co-authored-by: davidperezgar <davidperez@git.wordpress.org>
Co-authored-by: mukeshpanchal27 <mukesh27@git.wordpress.org>
Co-authored-by: foosantos <foosantos@git.wordpress.org>
Co-authored-by: bordoni <bordoni@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.