Fix WordPress.org plugin review issues#1
Merged
Merged
Conversation
- Add Development section to readme.txt with link to source code repository and build instructions, satisfying the human-readable code guideline. - Rename transient cache key prefix from `og_embed_` to `opengraph_fallback_embed_` and extract as a class constant to meet the unique naming guideline. - Expand inline style comment to document why wp_enqueue_style() cannot be used for oEmbed sandbox iframe content.
There was a problem hiding this comment.
Pull request overview
This PR updates the plugin to address WordPress.org review feedback by improving documentation, tightening transient cache key naming, and clarifying why inline styles are necessary for editor embeds.
Changes:
- Add a
== Development ==section toreadme.txtlinking to the GitHub repo and describing build tooling/source layout. - Rename the transient cache key prefix to a plugin-specific value and extract it into a
CACHE_KEY_PREFIXconstant; update tests accordingly. - Expand the inline-style comment explaining the block editor sandboxed iframe constraint for “rich” oEmbed responses.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
class-opengraph-fallback-embed.php |
Introduces CACHE_KEY_PREFIX, updates transient key generation, and expands the inline-style rationale comment. |
readme.txt |
Adds Development section and a new changelog entry documenting the review-driven changes. |
tests/ParseOgTagsTest.php |
Updates transient cleanup to use the new cache key prefix constant. |
tests/MaybeEmbedTest.php |
Updates transient cleanup to use the new cache key prefix constant. |
tests/EmbedBlockFallbackTest.php |
Updates transient cleanup for both URLs to use the new cache key prefix constant. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
Addresses the three issues raised during WordPress.org plugin review:
== Development ==section toreadme.txtlinking to the GitHub repo and documenting the build tooling (@wordpress/scripts), satisfying the human-readable code guideline.og_embed_toopengraph_fallback_embed_and extracted it as aCACHE_KEY_PREFIXclass constant. Old transients expire naturally within 7 days.<style>documentation: Expanded the code comment explaining why inline styles are required — the block editor renders oEmbed "rich" responses in a sandboxed iframe (wp.components.SandBox), andwp_enqueue_style()cannot reach it. This is a false positive from the reviewer and will need to be explained in the reply.Test plan
npm testto verify all PHPUnit tests pass with the new transient prefix