=== Kaiizen Shelf Life – Product SEO Audit & Content Refresh for WooCommerce ===
Contributors: huzoorbakhsh, freemius
Tags: woocommerce seo, product seo, seo audit, content refresh, product descriptions
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Find thin, outdated and incomplete pages with a WooCommerce product SEO audit, score every product and category, and fix what matters first.

== Description ==

Product pages go stale. Descriptions copied from the manufacturer, "Summer 2024" still in a product name, images without alt text, categories with no introduction, links to products you deleted last year. Each problem is small, but together they cost you search traffic and sales.

**Kaiizen Shelf Life** checks every product and product category in your WooCommerce store, gives each one a health score from 0 to 100, and shows you a prioritized list of what to fix first — in plain language, with a concrete "how to fix" for every issue.

It is made for store owners, not SEO experts. Instead of jargon you get messages like:

> This product's description is only 18 words. Add at least 132 more words — details about size, use, materials and what makes it different.

= What it checks =

**Products**

* **Thin descriptions** – long description under 150 words, or no short description.
* **Duplicate descriptions** – the same (or nearly the same) text on several products, usually copied from the manufacturer.
* **Outdated years and seasons** – past years or campaigns like "Summer 2024" or "Black Friday 2023" in the name or descriptions. Years inside SKUs, links and image attributes are ignored.
* **Meta description** – missing, too short or too long. Read from Yoast SEO, Rank Math or All in One SEO; without an SEO plugin, the short description is checked instead and the message says so.
* **SEO title** – missing or likely to be cut off in search results (when an SEO plugin is active).
* **Images** – no main image, too few images, or images without alt text.
* **Product details for Google** – missing price, SKU, reviews, and GTIN or brand (only if your store uses them).
* **Out of stock for a long time** – tracked from the day the plugin is installed.
* **Links to missing pages** – links in the description to deleted, draft or private products and pages.
* **Not updated in a long time** – a gentle reminder to review older products.

**Product categories**

* Missing or very short category description.
* Missing meta description.
* Empty categories, or categories where every product is out of stock.
* Outdated years and seasons in the name or description.

Every threshold can be changed, and every check can be turned off, in **Shelf Life → Settings**.

= How the fix list is ranked =

Each check can take points off a page's 100-point score, weighted by how serious the issue is (high, medium or low). The fix list puts first the pages that have the lowest scores *and* matter most — published, in stock, priced and featured products rank higher.

= Built for real stores =

* **Never changes your products on its own.** The free plugin only reads and reports. It never edits content and never changes a product's "last modified" date.
* **Fast on large catalogs.** Full scans run in the background in small batches with Action Scheduler (included with WooCommerce), and unchanged products are skipped. Tested with 10,000 products.
* **Always up to date.** Products and categories are re-checked automatically when you save them, when stock changes, and when you fix alt text in the Media Library. An optional weekly scan catches everything else.
* **Dismiss or snooze** any issue that does not apply to you.
* **Dashboard widget** on the WordPress dashboard with your store health and the top 3 fixes.
* **WP-CLI commands**: `wp kaiizen-shelf-life scan`, `status` and `reset`.
* Works with HPOS, multisite, right-to-left languages and screen readers.
* Fully translatable.

= For developers =

Shelf Life is built to be extended. Actions and filters include:

* `kzsl_register_checks` – add, replace or remove checks (implement `Kaiizen\ShelfLife\Checks\CheckInterface`, or extend `AbstractCheck`).
* `kzsl_item_importance` – replace the importance estimate, e.g. with traffic or sales data.
* `kzsl_item_context` – add data to the snapshot checks receive.
* `kzsl_check_weight`, `kzsl_severity_factors`, `kzsl_item_score`, `kzsl_item_priority` – tune scoring.
* `kzsl_seo_adapter` – support another SEO plugin.
* `kzsl_item_row_actions`, `kzsl_detail_panel_after`, `kzsl_dashboard_after_summary` – add links, panels and cards to the admin.
* `kzsl_after_scan_item`, `kzsl_scan_started`, `kzsl_scan_complete`, `kzsl_issue_status_changed`, `kzsl_settings_updated`, `kzsl_loaded`.

* `kzsl_admin_tabs` – add admin tabs with their own submenu item; `kzsl_background_hooks` – register background jobs so they are cleared on deactivation; `kzsl_uninstall_site` – remove add-on data on uninstall.

The React admin exposes JavaScript filters through `@wordpress/hooks`: `kzsl.adminTabs`, `kzsl.itemRowActions`, `kzsl.itemsBulkActions`, `kzsl.detailPanelAfter`, `kzsl.dashboardAfterSummary`, `kzsl.settingsBefore` and `kzsl.settingsAfter`. Enqueue your script on the `kzsl_admin_enqueue_scripts` action with `kzsl-admin` as a dependency.

The REST API lives under `/wp-json/kaiizen-shelf-life/v1/` and requires the `manage_woocommerce` capability.

The un-minified source of the admin app is included in the `src` folder; build it with `npm install && npm run build`.

= Premium version =

Everything in this plugin is free and fully functional, with no limits on the number of products and no time limit. A separate Premium version, available from the [plugin website](https://huzoorbux.com/kaiizen-shelf-life/), adds Google Search Console traffic data, sales-based priorities, AI-assisted writing, bulk content refresh, before-and-after results and a weekly email report. You never need it to use this plugin.

= Privacy =

The audit runs entirely on your own server. Kaiizen Shelf Life does not send your products, content or scan results anywhere. The only optional connection is the Freemius opt-in described under **External services**.

== External services ==

This plugin connects to one external service, and only if you choose to:

**Freemius** (optional usage-data opt-in). The plugin includes the [Freemius](https://freemius.com/) SDK. It does not ask you anything when you activate the plugin and sends nothing by default; an optional "Opt In" link on the Plugins screen lets you share basic usage information if you want to. If you opt in, Freemius receives your site URL, WordPress, PHP and plugin versions and your admin email address. Every feature works without opting in. [Terms of service](https://freemius.com/terms/), [privacy policy](https://freemius.com/privacy/).

== Installation ==

1. Make sure WooCommerce 8.0 or newer is installed and active.
2. Install Kaiizen Shelf Life from **Plugins → Add New**, or upload the zip file, then activate it.
3. Open **Shelf Life** in the admin menu and click **Scan store**. The scan runs in the background — you can leave the page.

A first scan also runs automatically about an hour after activation while the weekly scan is enabled.

== Frequently Asked Questions ==

= Will this plugin change my products? =

No. Shelf Life only reads your store and reports what it finds. It never edits product content and never changes a product's "last modified" date. You make the fixes yourself, in the normal product editor.

= Do I need an SEO plugin? =

No. Shelf Life works on its own. If Yoast SEO, Rank Math or All in One SEO is active, it also checks the SEO titles and meta descriptions you set there. Without one, it checks the short description (for products) and category description instead, and says so in the message.

= Will it slow down my store? =

No. Nothing runs on your shop's front end. Scans run in the background in small batches, skip products that have not changed, and re-checks after you save a product happen after the page has loaded.

= How does it know a product has been out of stock for 30 days? =

WooCommerce does not keep a stock history, so Shelf Life records the date a product goes out of stock from the day you install it. Products that were already out of stock on that day are counted from the install date, and the message says "at least" that many days.

= A year in my product name is correct (a model year). What do I do? =

Click **Dismiss** on that issue. Dismissed issues do not count against the score and stay dismissed through future scans. You can also **Snooze** an issue for 7, 30 or 90 days.

= Why are only some products flagged for a missing GTIN or brand? =

Those checks only run if at least 20% of your products already have a GTIN or brand, so stores that do not use them are not flooded with warnings.

= Does it work with large stores? =

Yes. It has been tested with 10,000 products. Scans use small batches, so no single request runs long, and memory use stays flat.

= Does it work on multisite? =

Yes. Each site has its own results and settings.

= How do I scan from the command line? =

`wp kaiizen-shelf-life scan` scans in the foreground with a progress bar (add `--force` to re-check unchanged items, or `--background` to queue a background scan). `wp kaiizen-shelf-life status` shows results and `wp kaiizen-shelf-life reset` clears them.

= What happens when I delete the plugin? =

Its database tables, settings, scheduled tasks and the out-of-stock dates it recorded are removed, on every site of a multisite network. Your products are not touched.

When removing the plugin with WP-CLI, run both commands as an administrator so the cleanup runs: `wp plugin deactivate kaiizen-shelf-life --user=<admin>` and then `wp plugin uninstall kaiizen-shelf-life --user=<admin>`.

= Is there a Premium version? =

Yes, as a separate download from the [plugin website](https://huzoorbux.com/kaiizen-shelf-life/). This plugin does not depend on it: every feature here works without it.

== Screenshots ==

1. Dashboard: your store health score, open issues by severity, the most common problems, and the products and categories to fix first.
2. Products list: score, open issues, priority and stock for every product, with filters for severity, problem, category and stock status.
3. Categories list: every product category scored and ranked by priority.
4. Detail view: each issue explained in plain language, with a "How to fix" hint and Dismiss or Snooze buttons.
5. Premium: Improve with AI on a product page. Rewrite the description, write a short description or suggest image alt text with the AI provider you connect in WordPress.
6. Premium: review queue. Compare each AI draft side by side with the current text, then approve, edit or reject it. Nothing is saved until you approve.
7. Premium: before and after results. Google visits, position and sales 14, 28 and 56 days after each change.
8. Premium: settings for Google Search Console and AI writing (brand voice, tone and description length).

== Changelog ==

= 1.2.0 =
* New: optional link to the separate Premium version (a dismissible card on the Shelf Life dashboard).
* New: optional usage-data opt-in through the Freemius SDK. Nothing is sent unless you click "Opt In" on the Plugins screen.

= 1.1.0 =
* New: developer hooks `kzsl_admin_tabs`, `kzsl_background_hooks`, `kzsl_uninstall_site`, `kzsl.itemsBulkActions` and `kzsl.settingsBefore`, and `Autoloader::add_namespace()`, so add-ons can add tabs, background jobs, bulk actions and their own classes.
* Improved: the dashboard widget's styles are now enqueued.
* Plugin name in the plugins list now matches the directory listing.

= 1.0.0 =
* Initial release.
* Product checks: thin, duplicate and outdated descriptions, meta description, SEO title, images and alt text, product details for Google, long out of stock, links to missing pages, not updated.
* Category checks: description, meta description, empty or sold out, outdated years and seasons.
* Health score and prioritized fix list, with dismiss and snooze.
* Background scans with Action Scheduler, re-checks on save and an optional weekly scan.
* Yoast SEO, Rank Math and All in One SEO support.
* Dashboard widget and WP-CLI commands.

== Upgrade Notice ==

= 1.2.0 =
Adds an optional link to the Premium version and an optional usage-data opt-in. Nothing is sent unless you opt in.

= 1.1.0 =
New developer hooks. The audit is unchanged and still never edits your products on its own.

= 1.0.0 =
First release.
