=== WeFresh SEO ===
Contributors: yourwporgusername
Tags: seo, broken links, internal links, content audit, woocommerce
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Track content freshness, find broken links, visualize your internal link structure, and audit every post, page and taxonomy for SEO.

== Description ==

WeFresh SEO tracks when every post, page, category, tag and WooCommerce taxonomy was last touched, finds broken links and internal redirects, and maps your entire internal linking structure as an interactive graph — so you always know what to fix first.

**Content Freshness**

WordPress stores a "last modified" date for posts and pages, but not for categories, tags, product categories or product tags. WeFresh stores these dates and backfills the ones that already exist, so you can search, sort, and see at a glance which content Google's freshness signals may no longer favour.

**Broken Link Scanner**

Scans the links inside your posts, pages, ACF fields, excerpts, and taxonomy content (both the built-in description field and custom WYSIWYG term-meta editors), then checks every internal link and flags 404s and redirects — each one grouped by the page you need to edit.

**Internal Link Graph**

See every page as a node and every internal link as a connection. Pages that link to each other cluster together automatically; weakly-linked pages form their own lighter cluster; true orphan pages (no incoming links) sit outside everything, easy to spot. Click any page to focus on just its connections, filter by content type, and save your layout so it stays put.

**Orphan Pages Report**

Find every post, page, category, tag or product taxonomy with zero internal incoming links — filterable by content type, and optionally showing Search Console clicks and impressions if you've uploaded a report.

**Search Console Integration**

Upload your Search Console Performance export (as a ZIP, no need to unzip it) to see clicks and impressions right next to your freshness and orphan-page data.

**Works With Any Content Type**

WeFresh automatically detects every public post type and taxonomy on your site, including your own custom ones — no configuration needed.

**Plays Well With Rank Math and Yoast**

Internal link counts for posts are read directly from Rank Math or Yoast if either is active, so a thin page and an unlinked page are easy to tell apart.

= Requirements =

* WordPress 6.5 or newer
* PHP 7.4 or newer
* Rank Math or Yoast SEO (optional, only used for post-level internal link counts)

== Installation ==

1. Upload the plugin through **Plugins → Add New → Upload Plugin**, or unzip it into `wp-content/plugins`.
2. Activate the plugin.
3. Open **WeFresh SEO → Content Freshness** and run **Initialise term dates** once, so existing categories and tags get a starting date.
4. Open **WeFresh SEO → Broken Links** and run a scan. This scan also supplies the data for the Internal Link Graph and the summary stats shown there.
5. Check your WordPress dashboard, the **Reports** page, or **Link Graph** to see everything together.

== Frequently Asked Questions ==

= Does this slow down my site? =

No. Every report and scan runs only when you open the relevant admin page or click "Start scan" — nothing runs on the public-facing side of your site.

= Does the broken-link scanner check external links? =

No, only internal links are checked, to keep scans fast and avoid unnecessary requests to other sites.

= What counts as an "orphan" page? =

A published, non-noindex page, post, category, tag or product taxonomy that has no internal links pointing to it from anywhere else on the site.

= Do I need Rank Math or Yoast? =

No. Without either, WeFresh still tracks freshness, scans for broken links, and builds the link graph. Rank Math/Yoast are only used to source internal link counts for individual posts; without them, post-level link counts simply won't be shown, though categories and tags still get their own link counts from WeFresh's own scan.

= Where does the Internal Link Graph get its data? =

From the same scan used by the Broken Links report. Run a scan first, then open Link Graph.

== Screenshots ==

1. The Internal Link Graph, showing pages as coloured nodes clustered by how tightly they link to each other.
2. The Content Freshness report and its dashboard chart.
3. The Broken Links report, grouped by page.

== Changelog ==

= 1.1.0 =
* New: Internal Link Graph — an interactive, clustered visualization of your site's internal linking structure, with focus mode, filters, and a saveable layout.
* New: Search Console CSV/ZIP upload, with clicks and impressions shown on the Orphan Pages and Content Freshness reports.
* New: Orphan Pages report, filterable by content type.
* Broken-link scanning now also covers post excerpts, ACF/custom postmeta fields, and structured "related" relationships stored in term meta.
* Post type and taxonomy detection is now fully automatic (previously required manual configuration).
* Various bug fixes, including a taxonomy-lookup issue affecting the link graph on sites with custom taxonomies.

= 1.0.2 =
* Broken-link scanner: internal 404 and redirect detection across posts, pages, and category/tag content.
* Two dashboard reports (content freshness, link health) and a combined Reports page.

= 1.0.0 =
* Initial release: content freshness tracking for posts, pages, categories, tags and WooCommerce taxonomies, with keyword search and internal link counts.

== Upgrade Notice ==

= 1.1.0 =
Adds the Internal Link Graph and Search Console integration. After updating, run a fresh scan from Broken Links so the graph and new reports have data to show.
