Download the PHP package kalimeromk/seo-report without Composer
On this page you can find all versions of the php package kalimeromk/seo-report. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kalimeromk/seo-report
More information about kalimeromk/seo-report
Files in kalimeromk/seo-report
Package seo-report
Short Description Framework-agnostic PHP SEO analysis: analyze URL/sitemap, return API result (JSON). Works with Laravel, Yii, or plain PHP.
License MIT
Informations about the package seo-report
SEO Report (framework-agnostic PHP)
SEO analysis library: analyze a URL or sitemap, run SEO/performance/security checks, and return an API result (no database). Works with Laravel, Yii, or plain PHP.
Requirements
- PHP 8.2+
- ext-dom, ext-json
- guzzlehttp/guzzle ^7.2
Optional (for advanced features):
- Docker 20.10+ (for Core Web Vitals, JS rendering, screenshots)
- Docker Compose 2.0+
No framework required. Use the same package in Laravel, Yii, Symfony, or standalone.
Installation
Quick Start (CLI)
Use directly from terminal:
Output: JSON API response with analysis results.
Checks Covered
The report is grouped by categories and includes checks like:
- SEO: title, meta description, headings (H1-H6), keyword consistency, image alts, canonical, hreflang, robots, noindex, in-page links, nofollow, language, favicon, friendly URLs
- Content Quality: duplicate content detection, internal linking analysis, content readability (Flesch score), keyword stuffing detection, thin content detection
- Performance: compression, load time, TTFB, page size, HTTP requests, cache headers, redirects, cookie-free domains, empty src/href, image optimization, defer JS, render blocking, minification, DOM size, doctype, resource hints (preconnect, preload, prefetch)
- Security: HTTPS, HTTP/2, mixed content, server signature, unsafe cross-origin links, HSTS, plaintext emails, security headers (CSP, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy)
- Mobile: viewport configuration, touch target size, font size readability, flexible layout detection
- Misc: structured data (Open Graph, Twitter Cards, Schema.org validation), meta viewport, charset, sitemap, social links, content length, text/HTML ratio, inline CSS, deprecated HTML tags, llms.txt, flash, iframes, accessibility checks
- Technology: server IP, DNS, DMARC/SPF, SSL certificate, reverse DNS, analytics and tech detection
Advanced Features (with Docker)
With Docker installed, you get additional real-world analysis:
- Core Web Vitals: Real LCP, FID, CLS, TTFB using Google Lighthouse (no API key needed)
- JavaScript Rendering: Detect React/Vue/Angular, hydration issues, console errors
- Screenshots: Desktop, mobile, and tablet screenshots
- Advanced Technology Detection: Detailed tech stack using Wappalyzer
Docker Setup (Optional but Recommended)
For real Core Web Vitals and JavaScript SEO analysis, install Docker:
That's it! No API keys, no registration, no rate limits.
Why Docker?
| Feature | Without Docker | With Docker |
|---|---|---|
| Core Web Vitals | ❌ Proxy estimates only | ✅ Real Chrome metrics (LCP, FID, CLS) |
| JavaScript SEO | ❌ Can't analyze JS | ✅ Detects React/Vue/Hydration issues |
| Screenshots | ❌ Not available | ✅ Desktop/Mobile/Tablet screenshots |
| Cost | Free | Free (just your server) |
| Rate Limits | None | None |
What It Returns
The package returns a JSON API response with this structure:
Result Structure
Each check in results has:
passed(bool) - Whether the check passedimportance('high' | 'medium' | 'low') - Priority levelvalue(mixed) - The actual value found (string, number, array, etc.)errors(array, optional) - Error details ifpassedis false
Example checks:
title- Page title (string)meta_description- Meta description (string)headings- All headings h1-h6 (array)header_tag_usage- H2-H6 heading counts and usage (array)load_time- Page load time in seconds (float)page_size- HTML size in bytes (int)https_encryption- Whether HTTPS is used (bool via passed)structured_data- Open Graph, Twitter, Schema.org (array)http_requests- Count of JS/CSS/Images/etc. (array)- And 70+ more checks...
Usage in Code
Basic Usage
Advanced Usage (with Docker)
Use SeoAnalyzerWithDocker instead of SeoAnalyzer to get real Core Web Vitals and JavaScript analysis:
Without Docker? No problem! SeoAnalyzerWithDocker gracefully falls back to basic analysis.
Custom Configuration
Analyze Sitemap
REST API Example (Laravel)
REST API Example (Yii)
Storing Results
The package does not save to database. Your app decides how to persist:
All Available Checks
SEO (33+ checks)
title- Page title tagtitle_optimal_length- Title optimal length (50-60 chars)meta_description- Meta description tagmeta_description_optimal_length- Meta description optimal length (120-160 chars)headings- H1-H6 headings structureheader_tag_usage- H2-H6 heading tag usage countscontent_keywords- Keywords in title vs contentkeyword_consistency- Keyword distribution across title, meta description, headingsimage_keywords- Images with missing alt attributesseo_friendly_url- URL structure and keywordscanonical_tag- Canonical link taghreflang- Alternate hreflang links404_page- Custom 404 error pagerobots- robots.txt rulesnoindex- Noindex meta tagnoindex_header- X-Robots-Tag header (noindex)in_page_links- Internal/external links countnofollow_links- Nofollow links countlink_url_readability- URL structure of all links (unfriendly URLs)language- HTML lang attributefavicon- Favicon presence
Content Quality & Duplicate Content:
duplicate_h1- Multiple H1 tags detectiontitle_uniqueness- Title vs H1 duplication checkthin_content- Low word count detection (< 300 words)content_uniqueness- Boilerplate content ratio analysismeta_description_quality- Meta description quality checkcanonical_effectiveness- Canonical tag implementation checkreadability_score- Flesch Reading Ease scorekeyword_stuffing- Excessive keyword density detectiontitle_quality- Title format analysis (power words, numbers)content_structure- Paragraph length and heading hierarchy
Internal Linking:
link_ratio- Internal vs external link ratiolink_distribution- Duplicate links and excessive linkscontextual_links- Descriptive vs navigational linksoutbound_links- Self-referencing link detectionanchor_text_quality- Empty/short anchor text detection
URL Structure:
url_length- URL length validation (< 115 chars)url_depth- Path depth analysis (max 3 levels)url_parameters- Query parameter analysisurl_format- Underscores, case, special chars checktrailing_slash- Trailing slash consistency
International SEO:
hreflang_validation- Valid language codeshtml_lang- HTML lang attribute validationlanguage_consistency- HTML lang vs hreflang matchx_default_hreflang- X-default fallback check
Pagination:
pagination_detection- Pagination indicatorsrel_next_prev- Next/prev link detectioninfinite_scroll- Infinite scroll detection
Performance (14+ checks)
text_compression- Gzip/Brotli compressionload_time- Page load timepage_size- HTML file sizehttp_requests- Number of resources (JS/CSS/Images)image_format- Modern image formats (WebP, AVIF)defer_javascript- Defer attribute on scriptsminification- JS/CSS minification checkdom_size- DOM nodes countdoctype- DOCTYPE declarationstatic_cache_headers- Static asset cachingexpires_headers- Cache expiration headersredirect_chains- Redirect chain detection
Resource Hints:
preconnect_hints- Preconnect to external domainsdns_prefetch_hints- DNS prefetch hintspreload_hints- Preload critical resourcesprefetch_hints- Prefetch next-page resources
Security (14+ checks)
https_encryption- HTTPS usagehttp2- HTTP/2 protocolmixed_content- HTTP resources on HTTPS pageserver_signature- Server header exposureunsafe_cross_origin_links- Links without rel="noopener"hsts- HTTP Strict Transport Security headerplaintext_email- Plaintext emails in HTML
Security Headers:
content_security_policy- CSP header validationx_frame_options- Clickjacking protection (DENY/SAMEORIGIN)x_content_type_options- MIME sniffing protectionreferrer_policy- Referrer information controlpermissions_policy- Feature policy restrictionscross_origin_policies- COOP/COEP/CORP headerssecurity_headers_score- Overall security score (A-D rating)
Mobile (6 checks)
viewport_config- Viewport meta tag validationtouch_target_size- Minimum 44x44px touch targets (WCAG 2.1)font_size_readability- Minimum 12px font sizeflexible_layout- Fixed width detectionmobile_friendly_patterns- Flash, frames, deprecated pluginszoom_accessibility- User zoom prevention detection
Miscellaneous (18+ checks)
structured_data- Open Graph, Twitter Cards, Schema.orgmeta_viewport- Viewport meta tagcharset- Character encodingsitemap- Sitemap in robots.txtsocial- Social media linkscontent_length- Word counttext_html_ratio- Text to HTML ratioinline_css- Inline CSS usagedeprecated_html_tags- Deprecated HTML tagsllms_txt- llms.txt file presence (for AI crawlers)flash_content- Flash/Shockwave content detectioniframes- iFrames usage
Structured Data Validation:
json_ld_validation- JSON-LD syntax validationschema_requirements- Required properties for common schemasduplicate_ids- Duplicate @id detectionstructured_data_images- Image URL validationschema_context- @context validation
Accessibility:
form_labels- Form inputs with missing labelsskip_navigation- Skip to content linkaria_usage- ARIA roles and attributes validationheading_hierarchy- H1-H6 hierarchy validationlink_text_quality- Generic link text detectiontable_accessibility- Table headers and captions
Technology (8 checks, no external APIs)
server_ip- Resolved server IP (gethostbyname)dns_servers- NS recordsdmarc_record- DMARC TXT record (_dmarc.domain)spf_record- SPF TXT recordssl_certificate- SSL/TLS certificate (valid, valid_from, valid_to, issuer_cn, subject_cn) — pure PHP, inspired by phpRank Softwarereverse_dns- PTR record for server IP (gethostbyaddr)analytics- Detected analytics (e.g. Google Analytics)technology_detection- Detected tech (e.g. jQuery, Font Awesome, Facebook Pixel)
Docker-Based Checks (requires Docker)
These checks run only when Docker is available:
Core Web Vitals (Real Chrome Metrics):
core_web_vitals- Real LCP, FID, CLS, TTFB using Google Lighthouselcp- Largest Contentful Paint (ms) - should be < 2500msfid- First Input Delay (ms) - should be < 100mscls- Cumulative Layout Shift - should be < 0.1ttfb- Time to First Byte (ms)performance_score- Lighthouse performance score (0-100)
JavaScript Rendering Analysis:
javascript_rendering- Full browser JavaScript execution checkframework- Detected framework (React, Vue, Angular, Next.js, Nuxt.js)has_hydration- Whether client-side hydration is detectedtitle_rendered- Whether title is rendered by JSh1_rendered- Whether H1 is rendered by JSrender_time_ms- Total render timeconsole_errors- JavaScript console errors count
Advanced Technology Detection:
advanced_technology_detection- Detailed tech stack using Wappalyzer- CMS, frameworks, analytics, hosting, CDN detection
Screenshots:
screenshot- Available viatakeScreenshot()method- Desktop, mobile, tablet viewports
- Base64 encoded images
- Visual metrics (CLS during load)
Exceptions
Docker FAQ
Do I need Docker?
No. The package works great without Docker. Docker is only needed for:
- Real Core Web Vitals (LCP, FID, CLS)
- JavaScript rendering analysis
- Screenshots
Without Docker, you still get 70+ SEO checks.
How much does Docker cost?
Free. You run it on your own server. No API fees, no rate limits.
What are the system requirements for Docker?
- Docker 20.10+
- Docker Compose 2.0+
- 4GB+ RAM (for headless Chrome)
- 2GB disk space
Can I use this in production?
Yes. Docker containers are isolated and run fresh on every request. No state is preserved between runs.
Is caching used?
No. By default, all Docker-based checks return fresh results. This is intentional - you want to see if issues were fixed after making changes.
What if Docker is not available?
SeoAnalyzerWithDocker gracefully falls back to basic analysis. No errors, just fewer features.
Example: Full Analysis with Docker
Testing
Reference
SSL certificate check (pure PHP, no Spatie dependency) and DNS/IP logic are inspired by phpRank Software (e.g. SSL Checker, DNS Lookup, Domain IP Lookup in ToolController). If you have that codebase at /path/to/phpRank Software, you can compare behaviour; seo-report uses only built-in PHP and Guzzle (no GeoIP, no WHOIS, no external APIs).
License
MIT.
All versions of seo-report with dependencies
ext-dom Version *
ext-json Version *
guzzlehttp/guzzle Version ^7.2
ext-libxml Version *
ext-openssl Version *