Cost for Roof Replacement Calculator

Quick SEO Content Analyzer

Paste your content below to check word count, estimated reading time, and keyword frequency.

Analysis Results

Words
0
Reading Time
0 min
function analyzeSEOContent() { var content = document.getElementById('seo-content-input').value; var keyword = document.getElementById('seo-keyword-input').value.trim().toLowerCase(); var resultsDiv = document.getElementById('seo-results'); if (!content) { alert('Please enter some content to analyze.'); return; } var words = content.trim().split(/\s+/).filter(function(word) { return word.length > 0; }); var wordCount = words.length; var readTime = Math.ceil(wordCount / 225); document.getElementById('res-word-count').innerText = wordCount; document.getElementById('res-read-time').innerText = readTime + ' min'; var densityMsg = "; if (keyword) { var regex = new RegExp('\\b' + keyword + '\\b', 'gi'); var count = (content.match(regex) || []).length; var density = ((count / wordCount) * 100).toFixed(2); densityMsg = 'Keyword Found: ' + count + ' times
'; densityMsg += 'Density: ' + density + '%
'; if (density > 2.5) { densityMsg += '⚠️ High density! Risk of keyword stuffing.'; } else if (density > 0.5) { densityMsg += '✅ Good keyword optimization.'; } else { densityMsg += 'ℹ️ Consider increasing keyword usage.'; } } else { densityMsg = 'Enter a focus keyword to check density.'; } document.getElementById('res-keyword-density').innerHTML = densityMsg; resultsDiv.style.display = 'block'; resultsDiv.scrollIntoView({ behavior: 'smooth', block: 'nearest' }); }

Leave a Comment