Cost per Serving Calculator

SEO Content Health Checker

0
function runSeoAnalysis() { var words = parseInt(document.getElementById('seo_word_count').value) || 0; var keywords = parseInt(document.getElementById('seo_kw_count').value) || 0; var images = parseInt(document.getElementById('seo_img_count').value) || 0; var score = 0; var container = document.getElementById('seo_results_box'); var scoreDisplay = document.getElementById('seo_score_num'); var labelDisplay = document.getElementById('seo_score_label'); var adviceDisplay = document.getElementById('seo_advice'); // Logic 1: Length if (words > 1800) score += 40; else if (words > 1000) score += 30; else if (words > 500) score += 15; // Logic 2: Density (Ideal 0.8% – 2%) var density = (keywords / words) * 100; if (density >= 0.8 && density 0 && density = 4) score += 25; else if (images >= 1) score += 10; container.style.display = 'block'; scoreDisplay.innerHTML = score + '%'; if (score >= 80) { container.style.backgroundColor = '#f0f6f0'; container.style.borderColor = '#7ad03a'; scoreDisplay.style.color = '#46b450'; labelDisplay.innerHTML = 'Excellent Optimization'; labelDisplay.style.color = '#46b450'; adviceDisplay.innerHTML = 'This page has a high probability of ranking for target terms. Ensure your meta description is as strong.'; } else if (score >= 50) { container.style.backgroundColor = '#fffcf0'; container.style.borderColor = '#ffb900'; scoreDisplay.style.color = '#996800'; labelDisplay.innerHTML = 'Moderate Optimization'; labelDisplay.style.color = '#996800'; adviceDisplay.innerHTML = 'Consider adding more comprehensive subtopics or checking your keyword placement in headings.'; } else { container.style.backgroundColor = '#fcf0f1'; container.style.borderColor = '#d63638'; scoreDisplay.style.color = '#d63638'; labelDisplay.innerHTML = 'Poor Optimization'; labelDisplay.style.color = '#d63638'; adviceDisplay.innerHTML = 'Content is likely too thin for competitive keywords. Increase word count and visual supporting evidence.'; } }

Leave a Comment