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

Check: uninstall.php existence #700

Open
threadi opened this issue Oct 5, 2024 · 2 comments
Open

Check: uninstall.php existence #700

threadi opened this issue Oct 5, 2024 · 2 comments

Comments

@threadi
Copy link

threadi commented Oct 5, 2024

Would it also be possible to add a check whether the uninstall.php exists? Unfortunately, many plugins forget this routine that should clean up after them. Checking for its presence should help to draw more attention to it.

@swissspidy
Copy link
Member

How would you expect this to work? Not every plugin adds data that needs to be cleaned up.

Also note that register_uninstall_hook exists too.

@threadi
Copy link
Author

threadi commented Oct 6, 2024

The hook has its disadvantages, as described here: https://developer.wordpress.org/reference/functions/register_uninstall_hook/

Both methods are described in the manual: https://developer.wordpress.org/plugins/plugin-basics/uninstall-methods/

Couldn't you check both and if neither is available, at least display a warning?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants