Make WordPress Core

Opened 11 years ago

Closed 6 years ago

#28574 closed enhancement (duplicate)

'Requires at Least' - New File Header Name for Plugin & Theme Compatibility Checks

Reported by: kopepasah's profile Kopepasah Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.0
Component: WordPress.org Site Keywords: dev-feedback needs-nacin
Focuses: administration Cc:

Description

Currently plugins have the ability to add 'Requires at Least' in the its readme.txt file header in order to show on its plugin page the least version of WordPress required to use the plugin.

I am recommending that this name (or something similar) be added as an optional item to the file headers of the main files for plugins and themes. This addition will add compatibility checks that WordPress can handle to prevent users from activating plugins and themes that are not compatible with their current version of WordPress.

Both of the two latest core themes (Twenty Thirteen & Twenty Fourteen) implement their own compatibility checks, along with many other plugins and themes (including my own). It would be much more efficient for core to handle this and plugin and theme developers to add a simple 'name' in its file header to check for compatibility.

Benefits

  • One set of code for compatibility checks for plugins and themes, handled by core.
  • Plugins & Themes can easily use this compatibility check.
  • Compatibility checks can happen before the theme or plugin are activated to prevent activation of incompatible software.
  • Users have a new reason to keep WordPress updated.

Potential UI

A UI that shows different availabilities for compatible and incompatible themes and plugins.

Themes

When you install a broken theme, a small notice appears at the bottom stating that the theme is installed, but broken.

http://cld.koopsah.com/image/3X0u3S0H4103/broken-themes.jpg

Something similar could be implemented for themes that shows that an incompatible theme is installed and an update to WordPress is required.

http://cld.koopsah.com/image/3f182O133R1Z/incompatible-themes.jpg

Plugins

I imagined something that prevents Activating or Updating the plugin unless the current WordPress version is compatible. Perhaps even a new tab that lists only 'Incompatible' plugins.

http://cld.koopsah.com/image/0z2b3z320v3u/incompatible-plugins.jpg


Potential Issue

Updates

Handling updates is probably the biggest challenge I can imagine, as we would not want users to have the ability to update a plugin or theme that is incompatible with their current version of WordPress.

Scenario
A developer updates a plugin or theme, adds some cool new features and changes the 'Requires at Least' meta information. This update prompts the users to update the plugin or theme on their dashboard; however, this particular user is running an incompatible version of WordPress.

Obviously we cannot update the plugin or theme, as doing so would cause the users site to potentially change unexpectedly (e.g. the theme or plugin is deactivated).

My recommendation for this scenario is to notify the user that this update would also require an update to core, then prompt the user to update both core and the plugin or theme.


Overall I think the benefits will be great by adding these compatibility checks for plugins and themes. However, I could be missing something.

What do you all think?

Change History (9)

#1 follow-up: @jdgrimes
11 years ago

  • Keywords close added

This may be a duplicate of #26909.

#2 in reply to: ↑ 1 @Kopepasah
11 years ago

  • Keywords dev-feedback 2nd-opinion added; close removed

Replying to jdgrimes:

This may be a duplicate of #26909.

I'd say it is similar, but is more fine tuned as it only addresses adding the check for WordPress (not PHP or MySQL). I personally do not think a requirement check for PHP or MySQL is a good idea for core, but these checks are focused solely on compatibility with WordPress.

#3 follow-up: @nacin
10 years ago

  • Component changed from Administration to Upgrade/Install
  • Milestone changed from Awaiting Review to Future Release

While this isn't a bad idea, I think this can mostly be handled from the .org/API side, without a new header. We shouldn't let you install a plugin on an older version of WordPress that isn't listed as compatible with the plugin. I don't think we should block the plugin if we're on a more recent version of WP than "tested up to", but "Requires at Least" seems like something we could *possibly* enforce in a slightly stronger manner than we do now.

#4 in reply to: ↑ 3 @chriscct7
9 years ago

  • Keywords needs-nacin added; 2nd-opinion removed

Replying to nacin:

While this isn't a bad idea, I think this can mostly be handled from the .org/API side, without a new header. We shouldn't let you install a plugin on an older version of WordPress that isn't listed as compatible with the plugin. I don't think we should block the plugin if we're on a more recent version of WP than "tested up to", but "Requires at Least" seems like something we could *possibly* enforce in a slightly stronger manner than we do now.

Per ticket:26909#comment:8 did you want to close this, or per comment:#3 did you want .org to handle this (WordPress.org Milestone?).

#5 @chriscct7
9 years ago

#13780 was marked as a duplicate.

This ticket was mentioned in Slack in #core by swissspidy. View the logs.


9 years ago

#7 @swissspidy
8 years ago

  • Component changed from Upgrade/Install to WordPress.org site

This ticket was mentioned in Slack in #core by swissspidy. View the logs.


8 years ago

#9 @SergeyBiryukov
6 years ago

  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Closing in favor of #46938, which has a patch. See also #meta4514 for the same change in the Plugin Directory.

Note: See TracTickets for help on using tickets.