Skip to content

Plugin does not clean up database table and options on uninstall #690

Description

@itsgajendraSingh

What problem does this address?

When the plugin is deleted, it leaves behind a custom database table (wp_wpai_request_logs) and all of its WordPress options (wpai_*) permanently. There is no uninstall.php file and no register_uninstall_hook() call anywhere in the plugin.

The log table stores request and response previews of AI operations user-authored content and AI outputs. Leaving this data behind after uninstall raises data privacy concerns and violates WordPress plugin guidelines which require plugins to clean up their own data on deletion.

The full list of data left behind:

  • Custom table: wp_wpai_request_logs
  • Options: wpai_features_enabled, wpai_feature_{id}_enabled, wpai_feature_{id}_field_developer (one set per feature), wpai_version, wpai_failed_upgrade_message, wpai_connector_approvals, wpai_connector_approval_pending, wpai_request_logs_schema_version

What is your proposed solution?

Add an uninstall.php file to the plugin root that drops the custom table and removes all wpai_* options.

add a "Remove all data on uninstall" checkbox to the plugin settings (unchecked by default) so users can choose whether to keep or wipe their data.

Note: cleanup should happen on uninstall only, not on deactivation, since deactivation is reversible and users may reactivate the plugin later.

Activity

  1. moved this from Triage to In progress in WordPress AI Roadmapon Jun 10, 2026
  2. hbhalodia commented on Jun 10, 2026

    @hbhalodia
    Contributor
  3. moved this from In progress to Needs review in WordPress AI Roadmapon Jun 10, 2026
  4. added this to the 1.1.0 milestone on Jun 10, 2026
  5. modified the milestones: 1.0.2, 1.1.0 on Jun 16, 2026
  6. moved this from Needs review to In progress in WordPress AI Roadmapon Jun 26, 2026
  7. modified the milestones: 1.1.0, 1.2.0 on Jun 26, 2026
  8. modified the milestones: 1.2.0, 1.3.0 on Jul 14, 2026
  9. moved this from In progress to Needs review in WordPress AI Roadmapon Aug 10, 2026
  10. moved this from Needs review to Done in WordPress AI Roadmapon Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions