{"id":14954859,"url":"https://github.com/wordpress/plugin-check-action","last_synced_at":"2026-01-18T05:42:22.037Z","repository":{"id":202610156,"uuid":"707583578","full_name":"WordPress/plugin-check-action","owner":"WordPress","description":"Test your WordPress plugin with Plugin Check","archived":false,"fork":false,"pushed_at":"2025-04-07T12:42:48.000Z","size":1824,"stargazers_count":82,"open_issues_count":8,"forks_count":7,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-09T22:17:44.563Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WordPress.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-20T08:12:24.000Z","updated_at":"2025-04-07T11:46:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"da4101a7-53ff-4cbb-b97e-a4660a50bd80","html_url":"https://github.com/WordPress/plugin-check-action","commit_stats":{"total_commits":187,"total_committers":5,"mean_commits":37.4,"dds":"0.25668449197860965","last_synced_commit":"862fefb6dd127a406f57e6ee5f55b7c6564b626d"},"previous_names":["swissspidy/wp-plugin-check-action","wordpress/plugin-check-action"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WordPress%2Fplugin-check-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WordPress%2Fplugin-check-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WordPress%2Fplugin-check-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WordPress%2Fplugin-check-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WordPress","download_url":"https://codeload.github.com/WordPress/plugin-check-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248119286,"owners_count":21050755,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T13:10:04.237Z","updated_at":"2025-04-09T22:17:49.903Z","avatar_url":"https://github.com/WordPress.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WordPress Plugin Check Action\n\nA GitHub action to run [Plugin Check](https://wordpress.org/plugins/plugin-check/) against your plugin.\n\nResults are posted as file annotations.\n\n## Example\n\n\u003cimg width=\"887\" alt=\"Plugin Check error messages output on GitHub Actions\" src=\"https://github.com/wordpress/plugin-check-action/assets/841956/31292472-51d5-487d-9878-1940a20e1e0b\"\u003e\n\n## Usage\n\nSee [action.yml](action.yml)\n\n```yaml\n- uses: wordpress/plugin-check-action@v1\n  with:\n    # Personal access token (PAT) used to comment on pull requests.\n    # Not currently used.\n    #\n    # [Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)\n    #\n    # Default: ${{ github.token }}\n    repo-token: ''\n\n    # Build directory of your plugin.\n    # Defaults to current directory / repository root.\n    #\n    # Default: './'\n    build-dir: ''\n\n    # List of checks to run.\n    # Each check should be separated with new lines.\n    # Examples: i18n_usage, file_type, late_escaping.\n    # By default, all checks are run.\n    #\n    # Default: ''\n    checks: ''\n\n    # List of checks to exclude from running.\n    # Each check should be separated with new lines.\n    # Examples: i18n_usage, file_type, late_escaping.\n    # Applies after the `checks` input.\n    #\n    # Default: ''\n    exclude-checks: ''\n\n    # List of error codes to ignore.\n    # Each error code should be separated with new lines.\n    # Examples: textdomain_mismatch, WordPress.Security.EscapeOutput.OutputNotEscaped.\n    #\n    # Default: ''\n    ignore-codes: ''\n\n    # List of categories to limit checks to.\n    # Each category should be separated with new lines.\n    # Examples: general, security\n    # By default, checks in all categories are run.\n    #\n    # Default: ''\n    categories: ''\n\n    # List of files (file paths) to exclude from checks.\n    # Each file should be separated with new lines.\n    #\n    # Default: ''\n    exclude-files: ''\n    \n    # List of directories to exclude from checks.\n    # Each directory should be separated with new lines.\n    #\n    # Default: ''\n    exclude-directories: ''\n    \n    # Whether to ignore warnings reported by Plugin Check.\n    #\n    # Default: false\n    ignore-warnings: ''\n\n    # Whether to ignore errors reported by Plugin Check.\n    #\n    # Default: false\n    ignore-errors: ''\n\n    # Whether to include experimental checks.\n    #\n    # Default: true\n    include-experimental: ''\n\n    # WordPress version to use. Supports \"latest\" or \"trunk\".\n    #\n    # Default: latest\n    wp-version: ''\n\n    # Severity level.\n    #\n    # Default: ''\n    severity: ''\n\n    # Error severity level.\n    #\n    # Default: ''\n    error-severity:\n\n    # Warning severity level.\n    #\n    # Default: ''\n    warning-severity:\n\n    # Include errors with lower severity than the threshold as other type.\n    #\n    # Default: ''\n    include-low-severity-errors: ''\n\n    # Include warnings with lower severity than the threshold as other type.\n    #\n    # Default: ''\n    include-low-severity-warnings: ''\n\n    # Slug to override the default.\n    #\n    # Default: ''\n    slug:\n\n    # Treat everything as an error.\n    #\n    # Default: false\n    strict: ''\n```\n\n### Basic\n\nThe simplest way to get up and running with your plugin.\n\nAdd a workflow (`.github/workflows/build-test.yml`):\n\n```yaml\nname: 'build-test'\non: # rebuild any PRs and main branch changes\n  pull_request:\n  push:\n    branches:\n    - main\n    - 'releases/*'\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    steps:\n    - name: Checkout\n      uses: actions/checkout@v3\n\n    - name: Run plugin check\n      uses: wordpress/plugin-check-action@v1\n```\n\n### Advanced Usage\n\nThe basic example above covers many use cases, but sometimes plugins can be a bit more\ncomplex and involve some sort of build process.\nAlso, if you already use tools like PHPCS, you might want to skip the PHPCS-based checks\nfrom Plugin Check but focus on the ones that are more useful for you.\n\n```yaml\nsteps:\n- name: Checkout\n  uses: actions/checkout@v3\n\n# Here's where you would run your custom build process\n# ...\n# ...\n\n- name: Build plugin\n  run: npm run build\n\n- name: Run plugin check\n  uses: wordpress/plugin-check-action@v1\n  with:\n    build-dir: './my-awesome-plugin'\n    exclude-directories: 'prefixed_vendor_dir,another_dir_to_ignore'\n    categories: |\n      performance\n      accessibility\n```\n\nA common build step involves the [`wp dist-archive`](https://github.com/wp-cli/dist-archive-command/) command.\nIn combination with Plugin Check it could be used like this:\n\n```yaml\nsteps:\n  - name: Checkout\n    uses: actions/checkout@v3\n\n  # Here's where you would run your custom build process\n  # ...\n  # ...\n\n  - name: Setup PHP\n    uses: shivammathur/setup-php@v2\n    with:\n        php-version: latest\n        coverage: none\n        tools: wp-cli\n\n  - name: Install latest version of dist-archive-command\n    run: wp package install wp-cli/dist-archive-command:@stable\n\n  - name: Build plugin\n    run: |\n      wp dist-archive . ./my-awesome-plugin.zip\n      mkdir tmp-build\n      unzip my-awesome-plugin.zip -d tmp-build\n\n  - name: Run plugin check\n    uses: wordpress/plugin-check-action@v1.0.6\n    with:\n      build-dir: './tmp-build/my-awesome-plugin'\n```\n\n### Supported Checks\n\nAt the time of writing, the following checks exist:\n\n* `i18n_usage`\n* `code_obfuscation`\n* `direct_db_queries`\n* `enqueued_scripts_in_footer`\n* `enqueued_scripts_size`\n* `enqueued_styles_scope`\n* `file_type`\n* `late_escaping`\n* `localhost`\n* `no_unfiltered_uploads`\n* `performant_wp_query_params`\n* `plugin_header_text_domain`\n* `plugin_readme`\n* `plugin_review_phpcs`\n* `plugin_updater`\n* `trademarks`\n\n### Supported Categories\n\nAt the time of writing, the following categories exist:\n\n* `accessibility`\n* `general`\n* `performance`\n* `plugin_repo`\n* `security`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwordpress%2Fplugin-check-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwordpress%2Fplugin-check-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwordpress%2Fplugin-check-action/lists"}