Skip to content

Commit d4f3eb3

Browse files
committed
Audit and fix both README files
1 parent 106ccde commit d4f3eb3

2 files changed

Lines changed: 17 additions & 25 deletions

File tree

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
[![CI](https://github.com/Hypercart-Dev-Tools/WP-Code-Check/actions/workflows/ci.yml/badge.svg)](https://github.com/Hypercart-Dev-Tools/WP-Code-Check/actions)
66
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
7-
[![Version](https://img.shields.io/badge/version-1.0.66-green.svg)](CHANGELOG.md)
7+
8+
> **Versioning:** See `dist/README.md` for the current released version. The version in the dist README (and the main bash script header) is the canonical source of truth.
89
910
---
1011

@@ -15,8 +16,8 @@ WordPress sites fail in production because of **performance antipatterns** that
1516
- 🔥 **Unbounded queries** (`posts_per_page => -1`) that fetch 50,000 posts and crash the server
1617
- 🐌 **N+1 query patterns** that turn 1 request into 1,000 database calls
1718
- 💥 **Missing capability checks** that let subscribers delete your entire site
18-
- 🔓 **Insecure deserialization** that opens remote code execution vulnerabilities
19-
- 🪲 **Debug code in production** (`var_dump`, `console.log`) that exposes sensitive data
19+
- 🔐 **Insecure deserialization** that opens remote code execution vulnerabilities
20+
- 🧲 **Debug code in production** (`var_dump`, `console.log`) that exposes sensitive data
2021

2122
**WP Code Check catches these issues in seconds** — before they reach production.
2223

@@ -71,7 +72,7 @@ cd WP-Code-Check
7172

7273
## Features
7374

74-
### 🔍 **33 Performance & Security Checks**
75+
### 🔍 **30+ Performance & Security Checks**
7576

7677
- **Critical**: Unbounded queries, insecure deserialization, localStorage sensitive data, client-side serialization, **direct database queries without $wpdb->prepare()**
7778
- **High**: Direct superglobal manipulation, **unsanitized superglobal read**, **admin functions without capability checks**, **WooCommerce N+1 patterns**, AJAX without nonce validation, unbounded SQL, expensive WP functions in polling
@@ -154,7 +155,7 @@ wp-code-check:
154155
155156
## Documentation
156157
157-
- **[User Guide](dist/README.md)** - Complete command reference and examples
158+
- **[User Guide](dist/README.md)** - Complete command reference and examples (includes canonical version number)
158159
- **[Template Guide](dist/HOWTO-TEMPLATES.md)** - Project template system
159160
- **[Changelog](CHANGELOG.md)** - Version history and development progress
160161
- **[AI Agent Guide](AGENTS.md)** - WordPress development guidelines for AI assistants

dist/README.md

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# WP Code Check by Hypercart - Performance & Security Analyzer
22

3-
**Version:** 1.0.63
3+
> **Versioning:** The canonical version is defined in `dist/bin/check-performance.sh` (see `SCRIPT_VERSION` in the script header). This README reflects that version but should not be treated as the primary source of truth.
4+
45
© Copyright 2025 Hypercart (a DBA of Neochrome, Inc.)
56

67
---
@@ -22,7 +23,7 @@ You're building a WordPress plugin or theme. Everything works great in developme
2223

2324
### The Solution
2425

25-
This toolkit **automatically detects 29 critical WordPress performance and security antipatterns** before they reach production.
26+
This toolkit **automatically detects 30+ critical WordPress performance and security antipatterns** before they reach production.
2627

2728
**Think of it as:**
2829
- 🛡️ **ESLint/PHPStan for WordPress performance** - catches issues static analysis misses
@@ -380,7 +381,7 @@ wp-analyze ~/Sites/my-plugin --format json > results.json
380381
JSON structure:
381382
```json
382383
{
383-
"version": "1.0.46",
384+
"version": "<SCRIPT_VERSION>",
384385
"timestamp": "2025-12-29T10:30:00Z",
385386
"paths_scanned": ["~/Sites/my-plugin"],
386387
"strict_mode": false,
@@ -401,16 +402,6 @@ JSON structure:
401402
"code": "'posts_per_page' => -1,",
402403
"message": "Unbounded posts_per_page can cause memory exhaustion"
403404
}
404-
],
405-
"checks": [
406-
{
407-
"id": "unbounded-posts-per-page",
408-
"name": "Unbounded posts_per_page",
409-
"status": "failed",
410-
"severity": "error",
411-
"impact": "CRITICAL",
412-
"finding_count": 2
413-
}
414405
]
415406
}
416407
```
@@ -445,20 +436,20 @@ $data = file_get_contents( 'https://api.example.com/data' );
445436

446437
| File | Purpose |
447438
|------|---------|
448-
| `bin/check-performance.sh` | Main analyzer - detects 28 antipatterns |
449-
| `tests/fixtures/*.php` | Test fixtures (antipatterns + clean code) |
450-
| `tests/run-fixture-tests.sh` | Validation test suite (9 tests) |
439+
| `dist/bin/check-performance.sh` | Main analyzer - detects 30+ antipatterns |
440+
| `dist/tests/fixtures/*.php` | Test fixtures (antipatterns + clean code) |
441+
| `dist/tests/run-fixture-tests.sh` | Validation test suite (number of tests may grow over time) |
451442

452443
### Integration Tools
453444

454445
| File | Purpose |
455446
|------|---------|
456-
| `bin/post-to-slack.sh` | Post results to Slack webhook |
457-
| `bin/format-slack-message.sh` | Format JSON as Slack Block Kit |
458-
| `bin/test-slack-integration.sh` | Test Slack integration |
447+
| `dist/bin/post-to-slack.sh` | Post results to Slack webhook |
448+
| `dist/bin/format-slack-message.sh` | Format JSON as Slack Block Kit |
449+
| `dist/bin/test-slack-integration.sh` | Test Slack integration |
459450
| `setup-integration-security.sh` | Setup credential protection |
460451

461-
See [PROJECT/DETAILS/INTEGRATIONS.md](../PROJECT/DETAILS/INTEGRATIONS.md) for integration guides.
452+
See the `PROJECT/` directory for detailed integration and architectural docs.
462453

463454
---
464455

0 commit comments

Comments
 (0)