Parsely / Parsely/wp-parsely

Uninstall leaves Content Intelligence user meta behind and deletes a key that no longer exists

Open
#4,554 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug
Dominant language
PHP
Stars
66
Forks
36
Avg merge
2d 2h
Merged PRs (30d)
16

Description

Summary

uninstall.php deletes a user meta key that the plugin no longer creates, while leaving behind the user meta keys it does create.

Current state

uninstall.php performs three deletions:

delete_option( 'parsely' );
delete_site_option( 'parsely' );
delete_metadata( 'user', -1, 'wp_parsely_page', '', true );

Two problems:

1. wp_parsely_page no longer exists. It was added in #531 ("Add Screen Options to toggle settings sections", Feb 2022) for the Screen Options feature. That feature has since been removed — wp_parsely_page appears nowhere in the codebase except this line, and there is no add_screen_option / set-screen-option usage left in src/. The line is dead.

2. The Content Intelligence settings user meta is not cleaned up. Base_Settings_Endpoint writes per-user settings under the keys returned by each subclass's get_meta_key():

  • parsely_content_helper_settings_editor_sidebar (written by the Editor Sidebar)
  • parsely_content_helper_settings_dashboard_widget (written by the Dashboard Widget)
  • parsely_content_helper_settings_traffic_boost (defined, but Endpoint_Traffic_Boost_Settings::get_subvalues_specs() currently returns array(), so nothing persists)
  • headline_testing (defined; see the separate issue about this endpoint)

None are removed on uninstall. Installations that have used Content Intelligence keep a row per user in wp_usermeta indefinitely.

The existing delete_metadata() call shows the intent is to clean up user meta on uninstall, so leaving these behind looks like an oversight rather than a deliberate choice to preserve preferences. Worth confirming that intent before changing behaviour.

Desired state

uninstall.php removes the user meta the plugin actually creates, and drops the dead wp_parsely_page line. Ideally the keys come from a single source shared with the endpoints, so a new settings endpoint cannot be added without its key being cleaned up.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading uninstall.php and Base_Settings_Endpoint, then inspect each subclass's get_meta_key() implementation for the listed Content Intelligence settings. Confirm the intended uninstall behavior, remove cleanup for the obsolete key, and ensure the user metadata actually created by the endpoints is removed without leaving endpoint keys unaccounted for.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.