=== Keyword Density Analyzer ===
Contributors: snehalpancholi
Tags: keyword density, SEO, content analysis, focus keyword
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.1
Stable tag: 1.0.0
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Real-time keyword density analysis for your posts and pages.

== Description ==

Keyword Density Analyzer adds a sidebar meta box to the WordPress editor showing real-time analysis of your focus keyword. See density percentage, keyword count, and whether the keyword appears in your title, headings, and first paragraph.

Features:

* Works with both Classic and Gutenberg editors
* Real-time analysis as you type — no page reload required
* Color-coded density indicator (green ≥ 1.0%, yellow 0.5–1.0%, red < 0.5%)
* Checks keyword presence in post title, H2, H3, and first paragraph
* Displays total word count and keyword occurrence count
* Saves focus keyword with the post for reference across sessions
* Zero external dependencies — pure PHP and vanilla JavaScript
* Lightweight: no bloat, no unnecessary scripts loaded globally

== Installation ==

1. Upload the `keyword-density` folder to `/wp-content/plugins/`
2. Activate the plugin via **Plugins > Installed Plugins** in your WordPress dashboard
3. Edit any post or page — the **Keyword Density** meta box appears in the sidebar
4. Type a focus keyword into the input field and watch the analysis update in real time

== Frequently Asked Questions ==

= Does this plugin work with the Gutenberg block editor? =

Yes. The plugin detects which editor is active and binds to the appropriate data source. In Gutenberg it uses the `wp.data` store to read live content and title changes.

= Does this plugin work with the Classic Editor? =

Yes. It listens to TinyMCE editor events and falls back to the raw textarea for the Text tab. A periodic poll ensures content changes are captured even when editor events are not fired.

= What density percentage should I aim for? =

A keyword density of 1–2% is a common guideline. The plugin highlights anything ≥ 1.0% in green, 0.5–1.0% in yellow, and below 0.5% in red.

= Does the plugin modify my content? =

No. It reads content purely for analysis. It only saves the focus keyword you enter as post meta.

= Is the focus keyword saved? =

Yes. The focus keyword is saved as post meta (`_addlc_kdc_focus_keyword`) when you publish or update the post.

== Screenshots ==

1. Meta box in the Classic Editor sidebar showing density badge, counts, and presence checks.
2. Meta box in the Gutenberg block editor sidebar with color-coded green indicator.
3. Red indicator when keyword density is below the 0.5% threshold.

== Changelog ==

= 1.0.0 =
* Initial release
* Real-time keyword density analysis for Classic and Gutenberg editors
* Color-coded density badge (green / yellow / red)
* Presence checks for title, H2, H3, and first paragraph
* Focus keyword saved as post meta
* AddonLogic automatic update system included

== Upgrade Notice ==

= 1.0.0 =
Initial release. No upgrade steps required.
