Skip to content

woocommerce/woocommerce-cs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WordPress/WooCommerce Hosting Benchmark Suite

A collection of server-side PHP tools and shell scripts for benchmarking WooCommerce hosting environments. The goal is to keep the application layer (WooCommerce) constant across environments, but rather make the hosting stack the variable.

What It Measures

Area Tool Method
PHP environment & OPcache/JIT env_check.php PHP config inspection
Object cache (Redis/Memcached) cache_check.php 1000-key read/write/delete benchmark
Database performance db_check.php Connection latency, query benchmarks, MySQL config
WooCommerce operations woo_benchmark.php Serialize, JSON, WP_Query, orders, cart totals
Disk I/O disk_benchmark.php Small/medium/large file operations, temp vs uploads
Outbound HTTP outbound_http.php Latency to payment gateways, DNS resolution
Memory pressure memory_benchmark.php Allocation speed, ceiling test, per-product/order cost
Action Scheduler action_scheduler_check.php Queue health, processing speed, cron config
Search / LIKE queries search_benchmark.php Product search, raw LIKE on posts/meta/options
PHP-FPM concurrency concurrency_check.php Worker config, self-test at 5/10/20 concurrent
TTFB run_ttfb.sh 100 requests per page, CDN and origin modes
Core Web Vitals run_cwv.sh PageSpeed Insights API (Lighthouse)
CDN / cache behavior run_cache_behavior.sh Cache warm-up, query strings, cookie bypass
REST API throughput run_rest_api.sh WooCommerce REST API latency per endpoint
Concurrency / load run_concurrency.sh Escalating parallel requests (1–50)

Quick Start

# 1. Clone and switch to the benchmarking branch
git clone https://github.com/woocommerce/woocommerce-cs.git
cd woocommerce-cs
git checkout sister-benchmarking

# 2. Set up your environment file
cp .env.example .env
# Edit .env with your host URLs, SSH credentials, and WooCommerce API keys

# 3. Run everything for a single host
./run_all.sh <host>

# Or run all configured hosts
./run_all.sh all

Selective Runs

You can target a specific host and phase:

./run_all.sh <host> deploy    # Deploy scripts only
./run_all.sh <host> php      # PHP benchmarks only (via CURL)
./run_all.sh <host> shell    # Shell benchmarks only (TTFB, CWV, load, etc.)

Results

Each run saves output to a timestamped directory:

results/20260227_160413_hostA/
  hostA_env.txt
  hostA_cache.txt
  hostA_db.txt
  hostA_bench.txt
  hostA_disk.txt
  hostA_outbound.txt
  hostA_memory.txt
  hostA_as.txt
  hostA_search.txt
  hostA_concurrency.txt
  hostA_ttfb_cdn.txt
  hostA_ttfb_origin.txt
  hostA_cwv_mobile.txt
  hostA_cache_behavior.txt
  hostA_rest_api.txt
  hostA_load.txt
  hostA_percentiles.txt
  run.log

Repository Structure

├── run_all.sh                 # Master runner (deploy + all benchmarks)
├── deploy.sh                  # SCP deploy to remote hosts
├── benchmarking-tools/        # PHP scripts (deployed to web roots)
├── sh-scripts/                # Shell scripts (run locally or via SSH)
└── results/                   # Benchmark output (gitignored)

Requirements

  • SSH access to each hosting environment
  • WooCommerce REST API consumer key/secret (for REST API benchmarks)
  • sshpass (if using password-based SSH auth): brew install hudochenkov/sshpass/sshpass
  • Google PageSpeed Insights API key (optional, for higher CWV rate limits)

Security

PHP benchmark scripts expose server internals. Remove all benchmark files from web roots after testing is complete. Never leave them on production sites.

About

Benchmark Tooling for Hosting Env

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors