Spaces:
Running
Running
| """ | |
| 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" | |
| } |