Skip to content

Internal: Run WordPress Theme Check on pull requests - #696

Open
Ntnelbaba wants to merge 1 commit into
mainfrom
feat/theme-check-pr-d5bf
Open

Internal: Run WordPress Theme Check on pull requests#696
Ntnelbaba wants to merge 1 commit into
mainfrom
feat/theme-check-pr-d5bf

Conversation

@Ntnelbaba

Copy link
Copy Markdown
Contributor

Summary

Adds a pull request check that runs the official WordPress Theme Check plugin — the same automated checker wordpress.org uses on theme uploads.

On each PR the workflow:

  1. Builds the distributable hello-elementor zip (not the raw git tree)
  2. Starts wp-env, installs Theme Check, and installs that zip as the hello-elementor theme
  3. Runs wp theme-check run hello-elementor
  4. Posts the full report as a sticky PR comment (<!-- hello-elementor-theme-check -->), updated on each push
  5. Uploads theme-check-report.txt as an artifact if the report exceeds GitHub’s comment size limit
  6. Fails the check when Theme Check exits non-zero

Test plan

  • Confirm the Theme Check workflow runs on this PR
  • Confirm the sticky PR comment contains the full Theme Check table
  • Confirm the theme-check-report artifact is uploaded
  • Confirm a later push updates the same comment instead of adding a new one
Open in Web Open in Cursor 

Add a PR workflow that packages the theme zip, runs the official Theme Check plugin in wp-env, and posts the full report as a sticky PR comment.

Co-authored-by: Netanel Baba <Ntnelbaba@users.noreply.github.com>
@Ntnelbaba
Ntnelbaba marked this pull request as ready for review August 25, 2026 16:31
@wiz-9a149474ff

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations 3 Low
SAST Finding SAST Findings -
Software Management Finding Software Management Findings -
Total 3 Low

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio.

cache: npm

- name: Setup PHP
uses: shivammathur/setup-php@v2
Comment thread .github/workflows/theme-check.yml
Comment thread .github/workflows/theme-check.yml
@github-actions

Copy link
Copy Markdown

Hello Elementor Build

Last updated at: 20260825.1631
Version: 3.5.1

✅ Hello Elementor build is ready for download.

You can download the latest build from the link below:

🔗 hello-elementor.3.5.1.zip

The build is available for 7 days.

@github-actions

Copy link
Copy Markdown

WordPress Theme Check

Status: passed (exit code 0)

Ran Theme Check against the packaged hello-elementor zip.

ℹ Starting 'bash hello-elementor-config/theme-check.sh' on the cli container. 

Installing Theme Check (20260821)
Downloading installation package from https://downloads.wordpress.org/plugin/theme-check.20260821.zip...
Unpacking the package...
Installing the plugin...
Removing the old version of the plugin...
Plugin updated successfully.
Activating 'theme-check'...
Plugin 'theme-check' activated.
Success: Installed 1 of 1 plugins.
Unpacking the package...
Installing the theme...
Removing the old version of the theme...
Theme updated successfully.
Activating 'hello-elementor'...
Success: Switched to 'Hello Elementor' theme.
Success: Installed 1 of 1 themes.
type	value
RECOMMENDED	No reference to register_block_pattern was found in the theme. Theme authors are encouraged to implement custom block patterns as a transition to block themes.
RECOMMENDED	No reference to register_block_style was found in the theme. Theme authors are encouraged to implement new block styles as a transition to block themes.
INFO	includes/elementor-functions.php The theme appears to use include or require. If these are being used to include separate sections of a template from independent files, then get_template_part() should be used instead. Line 17: require 'settings/settings-header.php';Line 18: require 'settings/settings-footer.php';
WARNING	A menu without a theme_location was found in template-parts/dynamic-header.php.  $menu_args  is used inside wp_nav_menu(). You must manually check if the theme_location is included.
INFO	Themes that use the tag accessibility-ready will need to undergo an accessibility review. See https://make.wordpress.org/themes/handbook/review/accessibility/
INFO	Only one text-domain is being used in this theme. Make sure it matches the theme's slug correctly so that the theme will be compatible with WordPress.org language packs. The domain found is hello-elementor.
RECOMMENDED	No reference to add_theme_support( "custom-header", $args ) was found in the theme. It is recommended that the theme implement this functionality if using an image for the header.
RECOMMENDED	No reference to add_theme_support( "custom-background", $args ) was found in the theme. If the theme uses background images or solid colors for the background, then it is recommended that the theme implement this functionality.
RECOMMENDED	No reference to add_theme_support( "wp-block-styles" ) was found in the theme. It is recommended that the theme implement this functionality.
RECOMMENDED	This theme contains no sidebars/widget areas. See Widgets API
✔ Ran `bash hello-elementor-config/theme-check.sh` in 'cli'. (in 2s 804ms)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants