badpixxel / paddock-seo
Paddock - Seo Extension
Requires
- php: ^7.4|^8.0
- ext-dom: *
- badpixxel/paddock-core: ^4.0
- symfony/browser-kit: ^4.0|^5.0|^6.0
- symfony/twig-bundle: ^4.0|^5.0|^6.0
Requires (Dev)
- badpixxel/php-sdk: ^2.0
README
Paddock extension for websites SEO analysis: crawl your pages (by route, url, or sitemap) and verify their DOM against SEO rules — meta tags, OpenGraph attributes, headers, images sizes & alt texts, and more.
Requirements
- PHP 8.1+ with
ext-dom badpixxel/paddock-core^5.0 (Symfony 5.4 → 8.x)
| Version | PHP | Paddock Core | Status |
|---|---|---|---|
| 5.x | ^8.1 | ^5.0 | Active |
| 4.x | ^7.4 | 4.x | Maintenance |
Installation
composer require badpixxel/paddock-seo
Available Collectors & Rules
| Collector | Collected Data |
|---|---|
seo-route | Pages rendered from Symfony routes (in-app, BrowserKit) |
seo-url | Pages fetched from live urls |
| Rule | Verification |
|---|---|
seo-link | Value is a valid url |
seo-headers | HTTP response headers |
seo-image | Images sizes, formats & alt texts |
seo-stats | Page statistics (size, nodes, ...) |
seo-xpath-attr | XPath attribute value checks |
seo-xpath-contents | XPath contents checks |
seo-default | Default SEO suite (meta, OpenGraph, images, ...) |
seo-advanced | Advanced SEO suite (adds images sizes limits) |
Usage
Analyze pages of a Symfony application by route names:
tracks:
my-seo-checks:
collector: "seo-route"
description: "Check My Pages SEO"
overrides:
rule: "seo-default"
rules:
"index": { }
"my-route": { }
Analyze a live url directly from the console:
php bin/paddock paddock:run seo-direct-url -o="https://www.example.com"
Analyze all urls of a sitemap (seo-sitemap-url track, enabled as soon as
PADDOCK_SEO_SITEMAP is defined):
PADDOCK_SEO_SITEMAP="https://www.example.com/sitemap.xml"
Ready-to-use constraints sets live in src/Resources/constraints/
(meta & OpenGraph attributes, core tags, images rules).
Development & Tests
All checks run identically in CI and locally: the GitLab pipeline executes
the exact same commands as the docker containers (one per Symfony version,
5.4 → 8.x). Test pages are rendered via Twig samples (tests/Resources/views)
served by a test controller, so the whole analysis chain runs in-process:
# Start all containers & run everything (composer, quality, tests)
make verify
# Run PhpUnit tests in all containers
make test
# Quality suites (GrumPHP: lint, code style, PhpStan)
php vendor/bin/grumphp run --testsuite=travis
php vendor/bin/grumphp run --testsuite=csfixer
php vendor/bin/grumphp run --testsuite=phpstan
# PhpUnit testsuites
vendor/bin/phpunit --testsuite=integration
License
Paddock is released under the MIT License.