Contents

Chapter 1

Features

This chapter covers the core features and capabilities of Page Speed Auditor.

Features

  • HTML Size Analysis: Flag bloated pages that take too long to parse
  • Render-Blocking Detection: Identify scripts and stylesheets that delay first paint
  • Image Audit: Missing dimensions (CLS), missing lazy loading, missing alt text
  • DOM Complexity: Measure nesting depth and element count
  • Inline Resource Tracking: Measure inline CSS and JS that can't be cached separately
  • Best Practices Check: Viewport meta, charset, doctype, preconnect hints
  • Response Time (TTFB): Measure server response time for live URLs
  • Performance Budget: Set custom thresholds and fail CI if exceeded
  • Batch Mode: Audit multiple URLs from a text file
  • Scoring: 0-100 score with A-F letter grades
  • Multiple Output Formats: Human-readable text or JSON

Installation

No installation needed. Just Python 3.10+ (standard library only).

bash
# Copy the script to your project
cp src/page_speed_auditor.py /your/project/

# Or run it directly from this directory
python src/page_speed_auditor.py --help

Quick Start

bash
# Audit a live URL
python src/page_speed_auditor.py --url https://example.com

# Audit a local HTML file
python src/page_speed_auditor.py --file examples/sample_page.html

# JSON output for CI/CD integration
python src/page_speed_auditor.py --url https://example.com --format json

# Batch audit multiple URLs
echo "https://example.com
https://example.com/about
https://example.com/contact" > urls.txt
python src/page_speed_auditor.py --input urls.txt

# Use a custom performance budget
python src/page_speed_auditor.py --url https://example.com --budget examples/performance_budget.json

# Save report to file
python src/page_speed_auditor.py --url https://example.com --output report.txt
Chapter 2

Performance Budget

Follow this guide to get Page Speed Auditor up and running in your environment.

Performance Budget

Create a JSON file with custom thresholds:

json
{
    "max_html_size": 100000,
    "max_resources": 30,
    "max_images": 20,
    "max_render_blocking": 3,
    "max_dom_depth": 15,
    "max_response_time_ms": 1000
}

The auditor will use these thresholds when scoring. Useful for CI/CD gates.

CLI Options

OptionDescriptionDefault
--url, -uURL to fetch and audit—
--fileLocal HTML file to audit—
--inputText file with URLs (batch mode)—
--format, -fOutput format: text, jsontext
--output, -oWrite output to filestdout
--budgetPerformance budget JSON file—
--timeoutHTTP timeout in seconds15
--verbose, -vEnable debug loggingfalse

One of --url, --file, or --input is required.

Scoring

The auditor starts at 100 and deducts points for each issue found:

IssueDeduction
HTML > 500 KB-15
HTML > 100 KB-5
8+ render-blocking resources-20
3+ render-blocking resources-10
Missing viewport meta-10
TTFB > 3 seconds-15
TTFB > 1 second-5
60+ total resources-15
DOM depth > 25-10
Images missing dimensions-5

Grades: A (90+), B (80+), C (70+), D (60+), F (<60)

Chapter 3
🔒 Available in full product

Exit Codes

Chapter 4
🔒 Available in full product

FAQ

You’ve reached the end of the free preview

Get the full Page Speed Auditor and unlock everything.

All Chapters

Get the complete guide with every chapter unlocked, including code samples, diagrams, and best practices.

Full Tool Suite

Access all interactive tools with complete data, all workload profiles, and the full scenario library.

Source Files

Downloadable source code, configuration files, and working examples from every chapter.

Lifetime Updates

Free updates for life. Every new chapter, tool, and improvement included.

Buy Now — $29 →
📦 Free sample included — download another copy for the full product.
Page Speed Auditor v1.0.0 — Free Preview