Repository navigation
fix: WordPress.org review — widgets through the widget registry; connected services by setting name, no value read (0.8.4) - #71
Merged
Conversation
…ected services by setting name, no value read (0.8.4)
Coverage and the text scan listed every widget_* option name from the
database and read each one; both now ask $wp_widget_factory, and each
registered widget reads its own settings. Text::widget_options() and its
SQL query are removed.
Integrations no longer reads option values to tell whether a credential
is set: the database answers whether a credential-named option is empty.
Form links count an existing account entry. secret_keys() and its
unserialize are removed; evidence is the option name ("mc4wp").
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0184na12xBsMwvjYqcX5LKJv
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0184na12xBsMwvjYqcX5LKJv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WordPress.org review (abb65, round 4) flagged
includes/class-contentrain-bridge-coverage.php:160:get_option( $name )on option names enumerated from the database. This PR removes every such read in the plugin, not only the flagged line.What changes
Text::widgets()lists$wp_widget_factory->widgets; eachWP_Widget::get_settings()reads its own option. A widget whose plugin is inactive is no longer counted or scanned (WordPress does not show it either).recent-commentsstays excluded from the text scan byid_base.option_value <> '' AS has_value;secret_present= credential-named option that is not empty. No option value is read. Form links: CF7 integration present → credential; WPForms provider with an account entry → credential.mc4wp), not the keys inside it (mc4wp (api_key)). Migrate only forwardssecret_present; nothing reads the detail.Supersedes / removes
Text::widget_options()and itswidget\_%SQL query (replaced byText::widgets()).widget\_%SQL query in coverage.Integrations::secret_keys()with itsunserialize(no caller left).Checks (local, clean WordPress container, WP_DEBUG on)
KEEP=1 npm run test:wordpresspasstest:text74,test:coverage79 + 76 + 13 RawIR,test:integrations27,test:secretspassgit grep 'get_option( \$' includesonly shows reads bounded by fixed names in code.Version 0.8.4 (plugin header, constant, Stable tag, changelog).
🤖 Generated with Claude Code
https://claude.ai/code/session_0184na12xBsMwvjYqcX5LKJv