.wp-seo-tool-container {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
border: 1px solid #e2e8f0;
border-radius: 8px;
padding: 20px;
background-color: #ffffff;
max-width: 100%;
margin: 20px 0;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.wp-seo-tool-title {
font-size: 20px;
font-weight: 700;
color: #1a202c;
margin-bottom: 15px;
border-bottom: 2px solid #3182ce;
padding-bottom: 8px;
}
.wp-seo-input-group {
margin-bottom: 15px;
}
.wp-seo-label {
display: block;
font-size: 14px;
font-weight: 600;
color: #4a5568;
margin-bottom: 5px;
}
.wp-seo-input {
width: 100%;
padding: 10px;
border: 1px solid #cbd5e0;
border-radius: 4px;
box-sizing: border-box;
font-size: 14px;
}
.wp-seo-button {
background-color: #3182ce;
color: white;
padding: 10px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
font-weight: 600;
width: 100%;
transition: background-color 0.2s;
}
.wp-seo-button:hover {
background-color: #2b6cb0;
}
.wp-seo-results {
margin-top: 20px;
padding: 15px;
background-color: #f7fafc;
border-radius: 4px;
display: none;
}
.wp-seo-stat {
display: flex;
justify-content: space-between;
padding: 5px 0;
border-bottom: 1px solid #edf2f7;
}
.wp-seo-stat-label {
color: #718096;
}
.wp-seo-stat-value {
font-weight: 700;
color: #2d3748;
}
.wp-seo-warning {
color: #c53030;
font-size: 12px;
margin-top: 4px;
}
.wp-seo-success {
color: #2f855a;
font-size: 12px;
margin-top: 4px;
}
function analyzeSEOContent() {
var keyword = document.getElementById('seo-keyword').value.toLowerCase().trim();
var text = document.getElementById('seo-text').value.trim();
var resultsBox = document.getElementById('seo-results-box');
var feedback = document.getElementById('seo-feedback');
if (!text) {
alert('Please enter some text to analyze.');
return;
}
resultsBox.style.display = 'block';
var words = text.split(/\s+/).filter(function(word) { return word.length > 0; });
var wordCount = words.length;
document.getElementById('res-word-count').innerText = wordCount;
var readingTime = Math.ceil(wordCount / 200);
document.getElementById('res-time').innerText = readingTime + ' min';
var density = 0;
var feedbackHtml = ";
if (keyword) {
var regex = new RegExp('\\b' + keyword + '\\b', 'gi');
var matches = text.match(regex);
var count = matches ? matches.length : 0;
density = ((count / wordCount) * 100).toFixed(2);
document.getElementById('res-density').innerText = density + '%';
if (density > 2.5) {
feedbackHtml += '
⚠ Keyword density is too high (' + density + '%). Risk of keyword stuffing.
';
} else if (density < 0.5) {
feedbackHtml += '
⚠ Keyword density is very low (' + density + '%). Consider using it more naturally.
';
} else {
feedbackHtml += '
✓ Keyword density is optimal.
';
}
} else {
document.getElementById('res-density').innerText = 'N/A';
}
if (wordCount < 300) {
feedbackHtml += '
⚠ Content is thin (under 300 words). Aim for 600+ for better SEO.
';
} else {
feedbackHtml += '
✓ Word count is sufficient for search engines.
';
}
feedback.innerHTML = feedbackHtml;
}
{
"@context": "https://schema.org",
"@type": "SoftwareApplication",
"name": "SEO Content Analyzer",
"operatingSystem": "Web",
"applicationCategory": "SEO Tool",
"offers": {
"@type": "Offer",
"price": "0",
"priceCurrency": "USD"
}
}