← Back to all products

Page Speed Auditor

$29

Page speed audit with Core Web Vitals, load time analysis, and optimization recommendations.

📁 11 files
JSONMarkdownPythonGitHub ActionsCI/CD

📄 Product Preview

Try the interactive reader and demo tools below, or get the full product with all content unlocked.

📖 Interactive Reader (Free Preview) ⚙ Try Demo Tools 📦 Download Free Sample

📁 File Structure 11 files

page-speed-auditor/ ├── LICENSE ├── README.md ├── examples/ │ ├── performance_budget.json │ └── sample_page.html ├── free-sample.zip ├── guide/ │ ├── 01_features.md │ ├── 02_performance-budget.md │ ├── 03_exit-codes.md │ └── 04_faq.md ├── index.html └── src/ └── page_speed_auditor.py

📖 Documentation Preview README excerpt

Page Speed Auditor

SEO Toolkit by CodeVault

Audit page performance by analyzing HTML structure, resource sizes, render-blocking patterns, and DOM complexity — all from the command line with zero dependencies.

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).


# 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


# 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

Performance Budget

Create a JSON file with custom thresholds:

... continues with setup instructions, usage examples, and more.

📄 Code Sample .py preview

src/page_speed_auditor.py #!/usr/bin/env python3 """ Page Speed Auditor — SEO Toolkit by DataNest Audit page performance by analyzing HTML structure, resource sizes, render-blocking patterns, and generating actionable optimization reports. Why this exists: Page speed is a confirmed Google ranking factor, but most developers check it manually via Lighthouse or PageSpeed Insights. This tool lets you audit pages programmatically from the command line — perfect for CI/CD pipelines, batch audits across hundreds of pages, and automated monitoring. It analyzes the raw HTML to identify: oversized images, render-blocking scripts/stylesheets, missing compression hints, excessive DOM depth, inline style bloat, and more. No browser required — just HTTP and HTML. Usage: python page_speed_auditor.py --url https://example.com python page_speed_auditor.py --input urls.txt --format json python page_speed_auditor.py --file page.html --budget budget.json License: MIT """ from __future__ import annotations import argparse import html.parser import json import logging import re import sys import time from dataclasses import dataclass, field from pathlib import Path from typing import Any from urllib.parse import urljoin, urlparse from urllib.request import Request, urlopen from urllib.error import HTTPError, URLError # --------------------------------------------------------------------------- # Constants # --------------------------------------------------------------------------- LOG = logging.getLogger("page-speed-auditor") USER_AGENT = "PageSpeedAuditor/1.0 (SEO Audit Tool; +https://datanest.dev)" # ... 856 more lines ...
Buy Now — $29 Back to Products