Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Test for pointless dashboard messages #814

Open
xwolfde opened this issue Dec 2, 2024 · 4 comments
Open

Suggestion: Test for pointless dashboard messages #814

xwolfde opened this issue Dec 2, 2024 · 4 comments
Labels
[Team] Plugin Review Issues owned by Plugin Review Team

Comments

@xwolfde
Copy link

xwolfde commented Dec 2, 2024

Some plugins display messages in the dashboard. These often refer to pro versions or the installation of additional plugins, like this:
Image

However, these messages are pointless if the plugin is used on a multisite and/or the users in the backend who see this message are not able to install new plugins.

I would therefore suggest adding a new rule and having it tested:

On single installations and on multisite:
If dashboard messages are displayed, then only to users with the administrator role.

If on multisite:
If dashboard messages are displayed, then only to users with the administrator role, provided they also have the capability to install plugins.

If a message is purely informative for users with a lower role on the current wordpress instance, the administrator must have a setting to turn this function on or off.

If such rules do not exist, there should be a warning message.

@swissspidy swissspidy added the [Team] Plugin Review Issues owned by Plugin Review Team label Dec 2, 2024
@swissspidy
Copy link
Member

How would a tool like Plugin Check be able to decide whether a dashboard message is "pointless" or not?

These rules sound a bit arbitrary. Why should notices only be displayed to administrators? They could be relevant for all types of users.

If you are looking to define such rules, then this is best done elsewhere, like a Trac ticket. Plugin Check can then implement any rules that were defined, but this repo is not a good place to initially discuss such rules.

You might also want to check out https://github.com/WordPress/wp-feature-notifications/.

@xwolfde
Copy link
Author

xwolfde commented Dec 2, 2024

Sure, there are informational messages, but in such cases, its on the administaror, who installed the plugin to decide if and which messages is viewable to the other roles.
PCP could check this by the admin_notices action. If this action is called for user without activate_plugins capability, its worth a warning.

Thank you for the link to the feature plugin, but this issue of about all those plugins out there, who bloat the wordpress dashboard with adds for their pro-versions.

@swissspidy
Copy link
Member

You are asking for PCP to check if plugins violate specific rules around admin notices.

Such rules currently do not exist and first need to be discussed and defined.

As I said, this repository is not the right place to define such rules.

it's on the administrator, who installed the plugin to decide if and which messages is viewable to the other roles.
If this action is called for user without activate_plugins capability, it's worth a warning.

Again, these are arbitrary rules. I suggest opening a Trac ticket do discuss such rules.

@xwolfde
Copy link
Author

xwolfde commented Dec 2, 2024

Its not arbitrary, its a matter of rule 11:
Upgrade prompts, notices, alerts, and the like must be limited in scope and used sparingly, be that contextually or only on the plugin’s setting page. Site wide notices or embedded dashboard widgets must be dismissible or self-dismiss when resolved. Error messages and alerts must include information on how to resolve the situation, and remove themselves when completed.

https://developer.wordpress.org/plugins/wordpress-org/detailed-plugin-guidelines/#11-plugins-should-not-hijack-the-admin-dashboard

And in case of the sample above, its mentioned also:

Advertising within the WordPress dashboard should be avoided, as it is generally ineffective.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Team] Plugin Review Issues owned by Plugin Review Team
Projects
None yet
Development

No branches or pull requests

2 participants