Make WordPress Core

Opened 2 years ago

Last modified 2 years ago

#55107 new enhancement

List and Delete button to delete broken plugins

Reported by: gmariani405's profile gmariani405 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Plugins Keywords:
Focuses: ui, administration Cc:

Description (last modified by SergeyBiryukov)

Much like we have for themes, there should be a list of broken plugins with an option to delete them directly from the admin panel.

Along the lines of this ticket ( #28165 ) but for plugins.

Change History (5)

#1 @audrasjb
2 years ago

  • Version 5.9 deleted

#2 @SergeyBiryukov
2 years ago

  • Description modified (diff)

#3 @SergeyBiryukov
2 years ago

  • Keywords reporter-feedback added

Hi there, welcome back to WordPress Trac! Thanks for the ticket.

How would be define broken plugins in this scenario? For a theme to be considered valid, it currently needs a style.css file and at least an index.php template (if it's not a child theme). For plugins, there is no such requirement, only the main plugin file is needed.

Last edited 2 years ago by SergeyBiryukov (previous) (diff)

#4 follow-up: @gmariani405
2 years ago

In my particular use-case, we use a migration tool that when it overwrites the existing installation it empties the folders of plugins that were in the prior installation but doesn't delete them. If you then try to install a plugin of the same name WordPress says it already exists and refuses.

Going based on what is explained here ( https://developer.wordpress.org/plugins/plugin-basics/#getting-started ) I would define a "broken" plugin as any folder in the root of plugins that does not contain a file within it's root with a valid plugin header.

So some practical examples:

  1. All files matching this pattern would have to be missing a valid plugin header: wp-content/plugins/plugin-name/<any file>.php
  2. There are no files in the root of a plugin folder: wp-content/plugins/plugin-name/<no files>

Basically, if a folder exists in the /plugins folder but isn't valid enough to show up in the Plugins list on the admin screen, I would say it is broken.

#5 in reply to: ↑ 4 @SergeyBiryukov
2 years ago

  • Keywords reporter-feedback removed

Replying to gmariani405:

I would define a "broken" plugin as any folder in the root of plugins that does not contain a file within its root with a valid plugin header.

That makes sense to me, thanks for the clarification!

Note: See TracTickets for help on using tickets.