npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@pluginauditor/cli

v0.1.7

Published

Audit a WordPress plugin for security, coding-standard, performance and compatibility issues from the command line or CI. Powered by pluginauditor.com.

Readme

@pluginauditor/cli

npm version npm downloads node license

Audit a WordPress plugin for security, coding-standard, performance and compatibility issues from the terminal or CI. Powered by pluginauditor.com.

Zero dependencies. Runs on Node 18+.

Usage

# Scan your local plugin (before you ship it)
npx @pluginauditor/cli scan ./my-plugin.zip

# Scan a published WordPress.org plugin
npx @pluginauditor/cli scan --slug=woocommerce

Get a token

The CLI authenticates with a scan token tied to your account (separate from the full WordPress-plugin API key, so a leaked CI secret can only run scans, never manage sites or billing).

  1. Sign in at app.pluginauditor.com.
  2. Open Account → Access Tokens and create a token. Give it a name (e.g. "CI" or the repo name).
  3. Copy the token when it's shown (it's shown once). You can revoke it any time from the same page.

Set it once in your shell, or pass --token on each run:

export PLUGIN_AUDITOR_TOKEN=your_token_here

In CI, store it as a secret (for example PLUGIN_AUDITOR_TOKEN in GitHub Actions) rather than committing it. Tokens are account-level, so the same token works across all your repos and machines; create a separate token per integration if you want to revoke them independently.

Options

| Flag | Description | |---|---| | --token <t> | API token (or PLUGIN_AUDITOR_TOKEN) | | --slug <s> | Scan a WordPress.org plugin by slug | | --version <v> | Specific version (with --slug). Omit to scan the plugin's latest release. | | --fail-on <sev> | Exit non-zero if any issue at/above this severity: critical | high | medium | low | none (default high) | | --category <list> | Only show findings in these categories (comma-separated): security, standards, performance, compatibility, privacy, accessibility | | --severity <list> | Only show findings at these severities (comma-separated): critical, high, medium, low, warning | | --json | Print the raw JSON result (never filtered) | | --sarif <file> | Also write a SARIF 2.1.0 report to <file> for GitHub code scanning (inline PR annotations) | | --no-annotate | Don't emit GitHub Actions inline annotations (auto-on inside Actions) | | --timeout <s> | Max seconds to wait (default 300) | | --api-url <url> | API base URL (or PLUGIN_AUDITOR_API_URL) | | --color / --no-color | Force or disable colored output |

Exit codes: 0 clean (under threshold), 1 threshold breached, 2 error.

Filtering the report

--category and --severity narrow the findings shown. They also scope the --fail-on exit gate, so a filtered run gates on exactly what it reports, which makes it easy to gate CI on one concern:

# Fail the build only on high or critical security issues
npx @pluginauditor/cli scan ./plugin.zip --category=security --severity=high,critical --fail-on=high

The overview always shows the active filter and an N of M issues shown count, so a filtered report is never mistaken for a clean one. The raw --json output is never filtered.

In CI (GitHub Actions)

Fail the build when a plugin has high-severity issues:

name: Plugin Audit
on: [pull_request]
jobs:
  audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: zip -qr plugin.zip . -x '.git/*'
      - run: npx @pluginauditor/cli scan ./plugin.zip --fail-on=high
        env:
          PLUGIN_AUDITOR_TOKEN: ${{ secrets.PLUGIN_AUDITOR_TOKEN }}

Example output

Findings are grouped by file (phpcs / WPCS style) with a per-file summary, then one row per finding in aligned columns: Category | Check name | Severity | Line | Issue. Warnings are included; plugin-level findings (no file/line) get their own block. The --fail-on threshold controls the exit code for CI; it is not printed as a verdict.

A SCANNING DETAILS overview is printed at the top and the bottom: plugin name/version, the scan date (in the machine's local timezone, with the zone shown), engine, total issues, per-category score /100 (checks passed/total) (matching the web report's category cards), issue totals by severity, and the report link.

The findings are wrapped in FINDINGS START / FINDINGS END banners (the SCANNING DETAILS overview sits outside them, at the top and bottom) so the report is easy to scan in CI logs. Each finding's Report link opens the full hosted report on pluginauditor.com, with the "How to fix" guidance for every issue.

Output is colored when it is written to a terminal (scores green/amber/red, severities red/amber, banners cyan) and plain when piped or redirected, so CI logs stay clean. Colors follow the NO_COLOR and FORCE_COLOR conventions, and --color / --no-color override the auto-detection.

SCANNING DETAILS
──────────────────────────────────────────────────────────────────────────────
Plugin Name               Hello Dolly
Plugin Version            1.7.2
Scan Date                 Sep 6, 2026, 3:36 PM GMT+5:30
Scanning Engine Version   2.0.0
Total Issues              19 issues found
Scores                    Security 51/100 (19/37)
                          Code Quality 85/100 (52/61)
                          Performance 42/100 (5/12)
                          Compatibility 33/100 (2/6)
                          Privacy 67/100 (2/3)
                          Accessibility 33/100 (2/6)
Severity                  3 high · 2 medium · 14 warnings
Report                    https://app.pluginauditor.com/scan/…
──────────────────────────────────────────────────────────────────────────────

════════════════════════════  FINDINGS START  ════════════════════════════

FILE: hello.php
──────────────────────────────────────────────────────────────────────────────
FOUND 3 high, 2 medium, 3 warnings AFFECTING 4 LINES
──────────────────────────────────────────────────────────────────────────────
  Standards | WordPress Alternative Functions  | WARNING  | 49 | mt_rand() is discouraged. Use wp_rand().
  Security  | Output Escaping (XSS Prevention) | HIGH     | 62 | All output should be escaped, found '__'.
  Security  | Output Escaping (XSS Prevention) | HIGH     | 63 | … found '$lang'.
──────────────────────────────────────────────────────────────────────────────

════════════════════════════  FINDINGS END  ════════════════════════════

SCANNING DETAILS
──────────────────────────────────────────────────────────────────────────────
Plugin Name               Hello Dolly
Plugin Version            1.7.2
Scan Date                 Sep 6, 2026, 3:36 PM GMT+5:30
Scanning Engine Version   2.0.0
Total Issues              19 issues found
Scores                    Security 51/100 (19/37)  ·  …
Severity                  3 high · 2 medium · 14 warnings
Report                    https://app.pluginauditor.com/scan/…
──────────────────────────────────────────────────────────────────────────────

License

MIT