File size: 942 Bytes
8913f77
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
"""
Benchmark constants for SEO Report Generator
"""

# SEO Performance Benchmarks
BENCHMARKS = {
    "mobile_score_min": 70,
    "desktop_score_min": 85,
    "lcp_max": 2.5,  # Largest Contentful Paint (seconds)
    "cls_max": 0.1,  # Cumulative Layout Shift
    "fid_max": 100,  # First Input Delay (milliseconds)
    "meta_complete_min": 90,  # Percentage
    "avg_words_min": 800,
    "avg_words_max": 1200,
    "keywords_top10_min": 20,  # Percentage
    "title_length_min": 30,
    "title_length_max": 60,
    "description_length_min": 120,
    "description_length_max": 160,
    "h1_coverage_min": 95,  # Percentage
    "cta_coverage_min": 80,  # Percentage
    "domain_rating_min": 30,  # Ahrefs DR
    "referring_domains_min": 100,
    "follow_ratio_min": 60,  # Percentage
}

def badge(value, is_ok):
    """Create badge data for benchmarks"""
    return {
        "value": value,
        "status": "pass" if is_ok else "fail"
    }