Skip to content

Bug: Plugin does not remove all data from the database on uninstall #902

@masteradhoc

Description

@masteradhoc

Describe the bug

Reported via: WordPress.org support forum
https://wordpress.org/support/topic/please-remove-data-from-db-on-uninstall/

Description

When the Two Factor plugin is uninstalled, not all plugin-related data is removed from the database. According to the WordPress plugin uninstall documentation, plugins should clean up all options, settings, and other database entities upon uninstallation.

Currently, the following data is not removed on uninstall:

  • two_factor_enabled_providers — left behind in the options table

Note: Data in the user_meta table is correctly deleted on uninstall. It's unclear whether any other residual data remains beyond what's listed above.

Expected Behavior

All plugin-specific data (options, user meta, custom tables, etc.) should be fully removed from the database when the plugin is uninstalled, leaving no orphaned records behind.

Actual Behavior

To be checked more detailed.

References

Steps to Reproduce

Screenshots, screen recording, code snippet

No response

Environment information

No response

Please confirm that you have searched existing issues in this repository.

Yes

Please confirm that you have tested with all plugins deactivated except Two-Factor.

Yes

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Status
In progress

Relationships

None yet

Development

No branches or pull requests

Issue actions