Barndominium Cost to Build Calculator

On-Page SEO Analyzer

Analyze your content length and readability instantly.

Words 0
Characters 0
Reading Time 0m
function runSeoAnalysis() { var text = document.getElementById('seoInput').value.trim(); var feedbackBox = document.getElementById('seoFeedback'); var words = text.split(/\s+/).filter(function(w) { return w.length > 0; }); var wordCount = words.length; var charCount = text.length; var readingTime = Math.ceil(wordCount / 225); if (text.length === 0) { feedbackBox.style.display = 'none'; return; } document.getElementById('wordCount').innerText = wordCount; document.getElementById('charCount').innerText = charCount; document.getElementById('readingTime').innerText = readingTime + 'm'; var checklist = '
SEO Insights:
    '; // SEO Logic if (wordCount < 300) { checklist += '
  • Thin Content: Content is too short for ranking high-competition keywords. Aim for 600+.
  • '; } else if (wordCount >= 1000) { checklist += '
  • Authority Length: Great depth! Ensure you use descriptive H2-H3 subheadings.
  • '; } else { checklist += '
  • Standard Length: Good for informational blog posts.
  • '; } if (charCount > 160) { checklist += '
  • Meta Warning: If this is a Meta Description, it exceeds 160 characters and may be truncated.
  • '; } var sentences = text.split(/[.!?]+/).filter(function(s) { return s.trim().length > 0; }); var longSentences = 0; for (var i = 0; i 25) longSentences++; } if (longSentences > 0) { checklist += '
  • Readability: Found ' + longSentences + ' long sentences. Break them up to improve user experience.
  • '; } else { checklist += '
  • Readability: Sentences are concise and easy to read.
  • '; } checklist += '
'; document.getElementById('seoChecklist').innerHTML = checklist; feedbackBox.style.display = 'block'; } function resetSeoAnalyzer() { document.getElementById('seoInput').value = "; document.getElementById('seoFeedback').style.display = 'none'; }

Leave a Comment