Skip to content

Fix WordPress.org plugin review issues#1

Merged
pento merged 1 commit into
mainfrom
fix/plugin-review-issues
Mar 24, 2026
Merged

Fix WordPress.org plugin review issues#1
pento merged 1 commit into
mainfrom
fix/plugin-review-issues

Conversation

@pento
Copy link
Copy Markdown
Owner

@pento pento commented Mar 24, 2026

Summary

Addresses the three issues raised during WordPress.org plugin review:

  • Source code documentation: Added a == Development == section to readme.txt linking to the GitHub repo and documenting the build tooling (@wordpress/scripts), satisfying the human-readable code guideline.
  • Transient key prefix: Renamed the transient cache key prefix from the generic og_embed_ to opengraph_fallback_embed_ and extracted it as a CACHE_KEY_PREFIX class constant. Old transients expire naturally within 7 days.
  • Inline <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), and wp_enqueue_style() cannot reach it. This is a false positive from the reviewer and will need to be explained in the reply.

Test plan

  • Run npm test to verify all PHPUnit tests pass with the new transient prefix
  • Verify the Development section renders correctly on WordPress.org (after deployment)
  • Confirm the inline style comment accurately describes the SandBox constraint

- 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.
Copilot AI review requested due to automatic review settings March 24, 2026 05:01
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 to readme.txt linking 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_PREFIX constant; 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.

Comment thread readme.txt
@pento pento merged commit 6180843 into main Mar 24, 2026
7 checks passed
@pento pento deleted the fix/plugin-review-issues branch March 24, 2026 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants