Webpage Quality Analyzer
High-performance webpage quality analyzer with 115 comprehensive metrics. Analyze web pages for SEO, content quality, technical standards, accessibility, and more - all in milliseconds.
๐ Features
- 115 Comprehensive Metrics across 7 categories (Content, SEO, Technical, Semantic, Accessibility, Network, Engagement)
- 9 Pre-configured Profiles optimized for different page types (news, blog, ecommerce, etc.)
- Multi-Platform Support: Native Rust, WebAssembly (browser/Node.js), C++ FFI, Python bindings
- High Performance: 180+ pages/second batch processing with parallel analysis
- Flexible Configuration: Custom profiles, metric weights, penalties, and bonuses
- Production Ready: Battle-tested, comprehensive test suite, extensive documentation
๐ฆ Installation
Add this to your Cargo.toml:
[]
= "1.0"
Or use cargo:
๐ฏ Quick Start
Level 1: Simple Usage
use ;
async
Level 2: Builder Pattern
use Analyzer;
async
Level 3: Advanced Configuration
use Analyzer;
async
Analyzing HTML Directly
let html = r#"
<!DOCTYPE html>
<html lang="en">
<head>
<title>Sample Page</title>
<meta name="description" content="A sample page">
</head>
<body>
<h1>Welcome</h1>
<p>This is a test page with some content.</p>
</body>
</html>
"#;
let report = analyze.await?;
println!;
๐ Metrics Categories
1. Content Metrics (20 metrics)
Word count, paragraph count, sentence complexity, content density, text-to-HTML ratio, content extraction quality, and more.
2. Technical Metrics (25 metrics)
Title length, meta description, heading structure, HTML validity, semantic elements, images (count, alt text, sizes), links, forms.
3. SEO Metrics (18 metrics)
Meta tags, Open Graph, Twitter Cards, canonical URLs, robots meta, schema.org structured data, sitemap links.
4. Semantic Metrics (15 metrics)
Heading hierarchy, ARIA labels, microdata, RDFa, JSON-LD, semantic HTML5 elements.
5. Accessibility Metrics (12 metrics)
ARIA attributes, roles, image alt text, form labels, color contrast, keyboard navigation.
6. Network Metrics (23 metrics)
Load time, TTFB, resource sizes (HTML, CSS, JS, images), HTTP status, redirects, compression, caching headers.
7. Engagement Metrics (2 metrics)
Interactive elements, CTAs, social sharing buttons.
๐จ Available Profiles
Choose the right profile for your page type:
| Profile | Best For | Key Focus |
|---|---|---|
general |
Any webpage | Balanced scoring across all metrics |
news |
News articles | Content freshness, readability, structure |
blog |
Blog posts | Content quality, engagement, readability |
ecommerce |
Product pages | Conversion elements, images, CTAs |
content_article |
Long-form content | Word count, structure, comprehensiveness |
product |
Product landing pages | Product details, images, specifications |
portfolio |
Portfolio sites | Visual content, project showcases |
login_page |
Login/auth pages | Forms, security, minimal content |
homepage |
Homepage | Navigation, structure, key messages |
โ๏ธ Feature Flags
Control optional features via Cargo features:
[]
= { = "1.0", = ["async", "linkcheck", "nlp"] }
Available features:
async(default) - Async runtime with tokio + reqwestreadability(default) - Mozilla Readability content extractionlinkcheck- External link validationnlp- Language detection and Unicode segmentationgrammar- Grammar checking (via nlprule)wasm- WebAssembly bindings (mutually exclusive with async)ffi- C FFI for C++ integrationcli- Command-line tool binary
๐ Multi-Platform Support
WebAssembly (Browser/Node.js)
# Build for npm
# Use in JavaScript/TypeScript
import from '@webpage-quality-analyzer/core';
const analyzer = ;
const report = await analyzer.;
console.log;
C++ Integration
CAnalyzer* analyzer = ;
CReport* report = ;
double score = ;
Command-Line Tool
# Download binary from releases
๐ง Customization
Custom Metric Weights
let analyzer = builder
.with_profile_name?
.with_metric_weight? // Increase importance
.with_metric_weight? // Double weight
.build?;
Custom Penalties & Bonuses
let analyzer = builder
.with_profile_name?
// Penalty: -5 points if word count < 500
.add_penalty_below?
// Bonus: +3 points if word count > 2000
.add_bonus_above?
.build?;
Disable Metrics
let analyzer = builder
.with_profile_name?
.disable_metric? // Skip grammar analysis
.disable_metric? // Skip language detection
.build?;
Output Customization
// Compact JSON (98.8% size reduction)
let compact = analyzer.run_compact.await?;
// Select specific fields
let minimal = analyzer.run_with_fields.await?;
๐ Performance
- Single page: < 1 second (typical)
- Batch processing: 180+ pages/second with parallel analysis
- Memory: ~50-100 MB per analyzer instance
- Thread-safe: Each analyzer instance is thread-safe
// High-performance batch processing
use analyze_batch_high_performance;
let urls = vec!;
let reports = analyze_batch_high_performance.await?; // 10 concurrent
๐ Documentation
๐งช Testing
๐ License
Dual licensed under MIT OR Apache-2.0. You can choose either license.
๐ค Contributing
Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.
๐ฆ Related Packages
- NPM:
@webpage-quality-analyzer/core- JavaScript/TypeScript (WASM) - CLI: Download binaries for Linux/Windows/macOS
- C++: Pre-compiled libraries with headers
- Python: Coming soon (PyO3 bindings)
๐ Why Choose This Analyzer?
- Comprehensive: 115 metrics covering all aspects of webpage quality
- Fast: Rust-powered performance, 180+ pages/sec batch processing
- Flexible: 9 profiles + full customization of weights, penalties, bonuses
- Multi-Platform: Works everywhere - Rust, WASM, C++, CLI
- Production-Ready: Extensive tests, documentation, real-world usage
- Modern: Async/await, latest Rust features, clean API design
๐ Example Report
Made with โค๏ธ in Rust | Version 1.0.0 | October 2025