Code Review Feedback — 2026-03-23
Reviewed branch: development (e2019e0)
Reviewer: @mrtwebdesign
Overall code quality is very good. Security model is solid, error handling is consistent, MCP server is well-architected. Issues below are organized by severity.
High
Medium
Low
Informational (Not Bugs)
Code Review Feedback — 2026-03-23
Reviewed branch:
development(e2019e0)Reviewer: @mrtwebdesign
Overall code quality is very good. Security model is solid, error handling is consistent, MCP server is well-architected. Issues below are organized by severity.
High
Committed
node_modulesin repo —tools/mcp-server/node_modules/is tracked in git. Should be in.gitignoreand installed vianpm ci. Bloats repo size and risks dependency drift.Symlinks to local system binaries committed —
npxandplaywrightin the repo root are symlinks to/opt/homebrew/bin/. These are machine-specific and will break for any other developer cloning the repo.temp/auth.jsonmay be tracked in git — Auth state file exists in the repo. Thetemp/directory is gitignored but this file may have been committed before the ignore rule was added. Could be leaking session tokens.No request size limits on MCP HTTP transport —
tools/mcp-server/src/index.ts. The HTTP handler has no Content-Length validation or request body size limits. A large payload could exhaust server memory.Medium
Stack trace loss in
withResourceError()—tools/mcp-server/src/index.ts(~line 89). Re-throwing errors drops the original stack trace and error context. Should usenew Error(message, { cause: error })to preserve the chain.Unstructured error for missing binaries in WPCC handler —
tools/mcp-server/src/handlers/wpcc.ts(~line 172). Non-ExecFileTextErrorexceptions (e.g. binary not found, permission denied) bubble up as unstructured crashes instead of returning a structured error result.No timeout on WP-CLI call in theme-crash-loop —
experimental/theme-crash-loop.sh(line 181).$LOCAL_WP ... option get homehas no timeout protection. If the site is unresponsive, the script hangs indefinitely. Wrap withtimeout 10.sed -i.baknot POSIX-portable —install.sh(line 394). This syntax works on macOS and GNU/Linux but is not POSIX-compliant. Could break on other systems or in Docker containers with minimal base images.Scattered timeout configuration across MCP handlers — Timeout values are hardcoded in each handler with no central config or env var overrides: local-wp 60s, pw-auth 120s, wpcc 300s, tmux 10s, qm 30s. Should be centralized in a config module.
pw-auth is 1000+ lines of bash — bin/pw-auth (Phase 1) #27
Stale/deprecated files still in repo —
BACKLOG-DEPRECATED.mdandROADMAP-DEPRECATED.mdare still tracked. If they're deprecated, they should be removed to reduce confusion.Low
Unquoted
$log_filein pipe-pane command —bin/aiddtk-tmux(line 101). Variable should be quoted to prevent word splitting if the path contains spaces.Unquoted glob pattern in test expression —
bin/wpcc(line 128). Pattern_*in a conditional test should be properly quoted to prevent unexpected glob expansion.&> /dev/nullnot POSIX-compliant —tools/wp-ajax-test/install.sh(line 17). Should be>/dev/null 2>&1for portability.Brittle Node.js version extraction —
tools/wp-ajax-test/install.sh(line 22).cut -d'v' -f2assumesnode --versionalways outputs avprefix. Could fail with non-standard Node distributions.README version behind package.json —
tools/mcp-server/README.mdsays 0.6.2 butpackage.jsonsays 0.6.3.Complex regex patterns lack documentation —
tools/mcp-server/src/security/allowlist.ts(line 16),handlers/tmux.ts(line 95),handlers/wpcc.ts(line 62). Shell operator blocking, field extraction, and ANSI stripping patterns have no inline comments explaining intent.Missing site parameter gives unclear error —
tools/mcp-server/src/index.ts(~line 188). When nositeis passed and no active site is set, the error message is"Could not resolve Local run configuration for site: undefined"instead of telling the user to runlocal_wp_select_sitefirst.Curl timeout handling gap in theme-crash-loop —
experimental/theme-crash-loop.sh(line 413). If curl times out, the headers file may not be written but subsequent code still tries to read it.Documentation bloat — 84 markdown files totaling 24,358 lines. Only ~30% are written for human developers. The rest are AI agent context, internal project management, or boilerplate. Consider consolidating or archiving non-essential docs.
Informational (Not Bugs)
tools/wp-code-check/is a git subtree — Maintained as a separate upstream project. Changes in this directory should flow through the upstream repo, not be made directly here.No rate limiting on MCP HTTP transport — Not an issue for local development (localhost-only binding), but would need to be addressed if HTTP mode is ever exposed beyond localhost.
WPCC is regex-based, not AST-based — By design. Heuristic patterns have ~5-10% false positive rate. Mitigated by baselines and comment suppression. Not a bug, just a known trade-off.