Skip to content

fix(previews): resolve Plugin Check errors in the shipped plugin - #838

Open
josephfusco wants to merge 4 commits into
mainfrom
fix/previews-plugin-check
Open

josephfusco wants to merge 4 commits into
mainfrom
fix/previews-plugin-check

Conversation

@josephfusco

@josephfusco josephfusco commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Fixes the real errors Plugin Check reports for the hwp-previews zip. One commit per fix:

  • Headers: Requires PHP: 8.2+ → 8.2 in the plugin header, because Plugin Check only accepts a plain version. readme.txt said PHP 7.4, from before 1.0.2 raised the minimum to 8.2, and now says 8.2.
  • "Tested up to" → 6.9 in both the header (which said 7.0) and readme.txt. 6.9 is the newest WordPress version the CI matrix tests.
  • License: readme.txt and composer.json said GPL-2.0, which reads as GPL-2.0-only, while the header said "GPLv2 or later". All three now say GPL-2.0-or-later.
  • ABSPATH guards in activation.php, deactivation.php, and the admin.php and iframe.php templates. Each guard goes after the file docblock, matching the existing pattern.

Testing

  • Built the zip with composer archive and ran wp plugin check hwp-previews locally in wp-env, using the same options as the workflow in ci: run Plugin Check on the built plugin archive #830. The only error left is "Tested up to: 6.9 < 7.1", which stays until WordPress 7.x is added to the matrix.
  • php -l and phpcs pass.
Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Assisting with running Plugin Check locally and fixing the errors it reported.

The plugin header said "8.2+", which Plugin Check rejects, and readme.txt still said
PHP 7.4 from before 1.0.2 raised the minimum to 8.2. readme.txt also said Tested up to
6.9 while the plugin header said 7.0; both now say 7.0.
@josephfusco
josephfusco requested review from a team and colinmurphy as code owners October 23, 2026 15:40
@josephfusco josephfusco added [Type] Bug An existing feature is broken [Area] Previews Issues for the HWP Previews plugin Security Work relates to vulnerabilities or hardening labels Oct 23, 2026
@changeset-bot

changeset-bot Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 321b358

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

📦 Plugin Artifacts Ready!

Download from GitHub Actions run

Available plugins:

  • ✅ hwp-previews.zip

See the "Artifacts" section at the bottom of the Actions run page

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

🔍 WordPress Plugin Check Report

❌ Status: Failed

📊 Report

🎯 Total Issues ❌ Errors ⚠️ Warnings
31 31 0

❌ Errors (31)

📁 examples/hwp-preview-rest/wp-env/uploads.zip (1 error)
📍 Line 🔖 Check 💬 Message
0 compressed_files Compressed files are not permitted.
📁 examples/hwp-preview-wpgraphql/wp-env/uploads.zip (1 error)
📍 Line 🔖 Check 💬 Message
0 compressed_files Compressed files are not permitted.
📁 examples/hwp-preview-rest/wp-env/setup/.htaccess (1 error)
📍 Line 🔖 Check 💬 Message
0 hidden_files Hidden files are not permitted.
📁 examples/hwp-preview-rest/.wp-env.json (1 error)
📍 Line 🔖 Check 💬 Message
0 hidden_files Hidden files are not permitted.
📁 examples/hwp-preview-wpgraphql/wp-env/setup/.htaccess (1 error)
📍 Line 🔖 Check 💬 Message
0 hidden_files Hidden files are not permitted.
📁 examples/hwp-preview-wpgraphql/wp-env/__MACOSX/._uploads (1 error)
📍 Line 🔖 Check 💬 Message
0 hidden_files Hidden files are not permitted.
📁 examples/hwp-preview-wpgraphql/.wp-env.json (1 error)
📍 Line 🔖 Check 💬 Message
0 hidden_files Hidden files are not permitted.
📁 examples/hwp-preview-astro/wp-env/setup/.htaccess (1 error)
📍 Line 🔖 Check 💬 Message
0 hidden_files Hidden files are not permitted.
📁 examples/hwp-preview-astro/.wp-env.json (1 error)
📍 Line 🔖 Check 💬 Message
0 hidden_files Hidden files are not permitted.
📁 .env.dist (2 errors)
📍 Line 🔖 Check 💬 Message
0 hidden_files Hidden files are not permitted.
0 application_detected Application files are not permitted.
📁 docs/.gitkeep (1 error)
📍 Line 🔖 Check 💬 Message
0 hidden_files Hidden files are not permitted.
📁 .docker/.env.ci (1 error)
📍 Line 🔖 Check 💬 Message
0 hidden_files Hidden files are not permitted.
📁 .editorconfig (1 error)
📍 Line 🔖 Check 💬 Message
0 hidden_files Hidden files are not permitted.
📁 .wp-env.json (1 error)
📍 Line 🔖 Check 💬 Message
0 hidden_files Hidden files are not permitted.
📁 phpstan.neon.dist (1 error)
📍 Line 🔖 Check 💬 Message
0 application_detected Application files are not permitted.
📁 bin/build-docker.sh (1 error)
📍 Line 🔖 Check 💬 Message
0 application_detected Application files are not permitted.
📁 bin/_lib.sh (1 error)
📍 Line 🔖 Check 💬 Message
0 application_detected Application files are not permitted.
📁 bin/sync-package-version.sh (1 error)
📍 Line 🔖 Check 💬 Message
0 application_detected Application files are not permitted.
📁 bin/run-codeception.sh (1 error)
📍 Line 🔖 Check 💬 Message
0 application_detected Application files are not permitted.
📁 bin/install-plugins.sh (1 error)
📍 Line 🔖 Check 💬 Message
0 application_detected Application files are not permitted.
📁 bin/install-test-env.sh (1 error)
📍 Line 🔖 Check 💬 Message
0 application_detected Application files are not permitted.
📁 bin/local/run-e2e-tests.sh (1 error)
📍 Line 🔖 Check 💬 Message
0 application_detected Application files are not permitted.
📁 bin/local/setup-docker-env.sh (1 error)
📍 Line 🔖 Check 💬 Message
0 application_detected Application files are not permitted.
📁 bin/local/run-qa.sh (1 error)
📍 Line 🔖 Check 💬 Message
0 application_detected Application files are not permitted.
📁 bin/local/run-unit-tests.sh (1 error)
📍 Line 🔖 Check 💬 Message
0 application_detected Application files are not permitted.
📁 .docker/init-docker.sh (1 error)
📍 Line 🔖 Check 💬 Message
0 application_detected Application files are not permitted.
📁 examples/hwp-preview-wpgraphql/example-app/src/pages/[identifier].js (1 error)
📍 Line 🔖 Check 💬 Message
0 badly_named_files File and folder names must not contain spaces or special characters.
📁 examples/hwp-preview-astro/example-app/src/pages/[...uri].astro (1 error)
📍 Line 🔖 Check 💬 Message
0 badly_named_files File and folder names must not contain spaces or special characters.
📁 hwp-previews.php (1 error)
📍 Line 🔖 Check 💬 Message
0 plugin_updater_detected Including An Update Checker / Changing Updates functionality. Plugin Updater detected. Use of the Update URI header is not allowed in plugins hosted on WordPress.org.
📁 readme.txt (1 error)
📍 Line 🔖 Check 💬 Message
0 outdated_tested_upto_header Tested up to: 6.9 < 7.1. The "Tested up to" value in your plugin is not set to the current version of WordPress. This means your plugin will not show up in searches, as we require plugins to be compatible and documented as tested up to the most recent version of WordPress.

🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check

…ix runs

The codeception matrix tests WordPress 6.7 through 6.9, so claiming 7.0 overstated what's tested.
The plugin header said GPLv2 or later, but readme.txt and composer.json said GPL-2.0,
which reads as GPL-2.0-only.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Area] Previews Issues for the HWP Previews plugin Security Work relates to vulnerabilities or hardening [Type] Bug An existing feature is broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant