=== SEOMedic — SEO Booster & Link Auditor ===
Contributors: andrewmurray
Donate link: https://getseomedic.com/
Tags: broken links, seo, meta description, focus keyword, internal linking
Requires at least: 5.8
Tested up to: 7.1
Stable tag: 2.94
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Audit broken links, fix missing meta descriptions, detect H1 issues, fix YouTube embeds, and clean up internal linking — all from one dashboard.

== Description ==

Broken links, missing meta descriptions, duplicate H1s, unembedded YouTube videos — small technical issues that quietly cost you rankings and clicks every day. SEOMedic finds all of them in one place and gives you the tools to fix them fast.

No more crawling through posts one by one. No more spreadsheets. One dashboard, every issue, fixed in minutes.

**🔗 Broken Link Detection**

Scan every post and page for broken external links. SEOMedic checks the live HTTP status of each URL and flags anything returning an error. Fix the URL inline — no need to open the post editor — then re-check immediately to confirm.

**📝 Missing & Broken Meta Descriptions**

See every post missing a meta description in one sorted list. Flags meta descriptions that are too short (rewritten by Google) or too long (truncated in SERPs).

**🔍 Focus Keyword Assistant**

See every post missing a focus keyphrase. Bulk-sync focus keywords to Yoast SEO or Rank Math with one click.

**🧹 Content Pruning & Redirects**

Find low-performing posts that drag the rest of your site down. Save 301 redirect targets per post (stored locally — no external service). Decide which trashed posts should redirect somewhere and which should 404 cleanly.

**🖼️ Image Optimisation**

Rename uploaded image files to SEO-friendly basenames, audit alt-text coverage, and find images embedded without dimensions.

**H1 Tag Issues**

Posts with more than one H1 confuse search engines. SEOMedic lists every offending post and shows you the exact text of each H1 so you know which ones to demote to H2 or H3.

**▶️ YouTube & Video Issues**

Three video problems caught in one panel: plain YouTube links that will never auto-embed, Gutenberg embed blocks missing the 16:9 aspect ratio class, and Classic Editor iframes with hardcoded dimensions that break on mobile.

**🔀 Internal Link Health**

Find orphan posts with no inbound internal links, and spot link opportunities where another post on your site already mentions the topic but does not link to it.

**🗺️ Sitemap & Schema Audits**

Verify your sitemap is reachable and well-formed. Scan every post for Schema.org markup coverage and surface missing types.

**⚡ Core Web Vitals (optional)**

Connect a free Google PageSpeed Insights API key and audit your site's Core Web Vitals (LCP, INP, CLS) per page. The API key is yours — the plugin never proxies through us.

**⚙️ Bulk Link Management**

Browse every link across your entire site in one table. Apply nofollow, sponsored, UGC, or open-in-new-tab to hundreds of links at once. Find and replace a URL site-wide in seconds.

**Works with Yoast SEO and Rank Math**

Meta descriptions and SEO titles sync with Yoast SEO or Rank Math if active. Falls back to the native post excerpt when neither is installed.

= Want AI generation, Search Console, and Bing? =

Those features live in the separate **SEOMedic Pro** add-on plugin, which you can install alongside this one. Pro adds AI meta/title generation (Claude), Google Search Console integration with CTR opportunity scoring, Bing Webmaster Tools integration, and a Gutenberg post-insights sidebar. Install Pro from your account at the plugin author's site — it is not hosted here.

== Installation ==

1. Upload the `seomedic-seo-link-auditor` folder to `/wp-content/plugins/`, or install via **Plugins → Add New** in your WordPress admin.
2. Activate the plugin through the **Plugins** screen.
3. Navigate to **SEOMedic** in the WordPress admin sidebar.

**For Core Web Vitals audits (optional):**

1. Get a free [Google PageSpeed Insights API key](https://developers.google.com/speed/docs/insights/v5/get-started).
2. Enter it under **SEOMedic → Settings → Performance**.

== Frequently Asked Questions ==

= Does this work with any theme? =

Yes. The plugin operates entirely through the WordPress admin area and the REST API — it is theme-independent.

= Which SEO plugins are supported for focus keywords? =

Yoast SEO and Rank Math. SEOMedic is compatible with both — use it as an SEO booster alongside either plugin. If neither is installed, the focus keyword is stored in the plugin's own post meta field.

= Will editing links here change my post content? =

Yes. When you save a link change the plugin updates the post content in the database via the WordPress REST API, exactly as if you had edited the post in the block editor.

= Does this plugin send any data to external servers? =

Link checking, meta description scanning, focus keywords, redirect saving, image rename, H1/video/schema/sitemap detection, and internal link health all run entirely within your WordPress site.

Two optional connections exist:

* If you opt in to Freemius on activation (it shows a notice — you can skip), your site URL, WordPress version, PHP version, and admin email are sent to Freemius for licence management and usage telemetry.
* If you provide a Google PageSpeed Insights API key and run the Core Web Vitals audit, the plugin sends each page URL to Google PageSpeed Insights.
* If you provide an Open PageRank API key, the plugin sends your own domain name to Open PageRank to retrieve an authority score.

Nothing else leaves your server.

= Does this plugin contain affiliate links? =

Yes, and they are labelled "(affiliate link)" wherever they appear in the plugin.

There are currently two. SEOMedic earns a commission if you buy through either, at no extra cost to you:

* **WordPress-optimized hosting** — shown on the loading screen, and only when the dashboard is running slowly.
* **ShortPixel image optimiser** — shown in the Oversized images panel, next to the note explaining that SEOMedic deliberately does not compress or convert images itself.

Both are marked `rel="nofollow sponsored"` so search engines are told about the relationship too, not only you.

Affiliate links never affect what the plugin reports. No audit result, score, or recommendation changes because of a commercial relationship, and no section exists in order to create one. Where the plugin recommends a category of tool it doesn't compete with — an image optimiser, for instance — it says so because that is the honest answer, whether or not the link earns anything.

== External Services ==

This plugin only contacts third-party services in the cases listed below, and only when you have explicitly opted in or provided your own credentials.

= Google PageSpeed Insights API =

* **What it does:** Retrieves Core Web Vitals (LCP, INP, CLS) for individual page URLs so you can audit performance.
* **When it connects:** Only when you have entered a PageSpeed Insights API key under SEOMedic → Settings and you run the Core Web Vitals audit.
* **Data sent:** The page URL being audited. No post content, no user data.
* **Service URL:** https://www.googleapis.com/pagespeedonline/v5/runPagespeed
* **Privacy Policy:** https://policies.google.com/privacy
* **Terms of Service:** https://developers.google.com/terms

= Open PageRank (Keywords Everywhere) =

* **What it does:** Returns a 0–10 PageRank-style authority score for your own domain, shown on the Backlinks card. This is Open PageRank, not Moz Domain Authority.
* **When it connects:** Only when you have entered an Open PageRank API key under SEOMedic → Settings, and only when the Backlinks card is loaded or refreshed. Cached for 7 days.
* **Data sent:** Your own site's domain name. No post content, no user data, no visitor data.
* **Service URL:** https://openpagerank.com/api/v1.0/getPageRank
* **Privacy Policy:** https://www.domcop.com/privacy-policy
* **Terms of Service:** https://www.domcop.com/terms-of-service

= Freemius =

* **What it does:** Handles plugin activation, opt-in usage telemetry, and software updates.
* **When it connects:** Upon plugin activation (opt-in only — users are shown a notice and can skip data sharing). Also during licence verification and update checks.
* **Data sent:** Site URL, WordPress version, plugin version, PHP version, and (if opted in) admin email address.
* **Service URL:** https://wp.freemius.com/
* **Privacy Policy:** https://freemius.com/privacy/
* **Terms of Service:** https://freemius.com/terms/

== Source code & build instructions ==

The React admin UI in `admin/build/` is built from the human-readable
TypeScript/TSX sources in `admin/src/`, which are included in this zip.
No third-party AI/Claude code is bundled into the free distribution —
those features live in the separate SEOMedic Pro add-on plugin.

To rebuild the admin UI from source:

    cd admin
    npm install
    npm run build

Build tool: Vite 6 with @vitejs/plugin-react. See `admin/package.json`
and `admin/vite.config.ts` for the full configuration. The output is
written to `admin/build/index.js` and `admin/build/index.css`.

== Screenshots ==

1. One dashboard — every audit in one place: broken links, meta descriptions, internal link health, outdated dates, mixed content, and more.
2. AI traffic classification — see which pages are winning, leaking clicks, or dead weight, with Google + Bing data side by side (SEOMedic Pro).
3. AI Search Readiness — score every post on whether ChatGPT, Google AI Overviews, and Perplexity will cite it as a source (SEOMedic Pro).
4. Link audit table — browse, filter, and edit every external link across your posts in one view.
5. Bulk rel-attribute editing — apply nofollow, sponsored, UGC, and open-in-new-tab to multiple links at once, then save in one click.
6. YouTube & Video Issues — find unembedded video links, wrong-aspect-ratio embeds, and hardcoded iframes.

== Changelog ==

Only the three most recent releases are listed here. The full history ships
with the plugin in changelog.txt.

= 2.94 =
* Updated the Freemius SDK to 2.13.5 (security hardening: escaped output throughout, and only site administrators can opt in).
* Bug reports from Settings now arrive marked as bug reports.

= 2.93 =
* Improved: in Focus Keyword vs Ranking, the header row stays visible while you scroll, and a new legend explains each "Ranks for it?" badge (exact, variant, related only, not in top 25).

= 2.92 =
* New: a Report a bug section at the bottom of Settings. Describe the problem, and SEOMedic adds the versions, theme and active plugins you can review before sending. Send opens the support form with the report filled in; nothing is sent until you press Send there.
* Fixed: the Support link on the Plugins screen now opens the support form on free installs too.

== Upgrade Notice ==

= 2.94 =
Freemius SDK 2.13.5 with security hardening.

= 2.93 =
Focus Keyword vs Ranking keeps its header in view and explains its match badges.

= 2.92 =
Adds a Report a bug section to Settings.

= 2.91 =
Fixes inflated CTR figures in the AI SEO task list; regenerate the list after updating.

= 2.90 =
Damaged Block Markup repairs more embed types and images left inside image, embed or quote blocks.

= 2.89 =
Repair no longer merges a video link and heading into one paragraph, and fixes posts it already affected.

= 2.88 =
Change results moves to a card at the top of the Analytics page.

= 2.87 =
Live SERP checks drive the CTR diagnosis (Pro, optional), and title, meta and content changes are now measured automatically over 28 days.

= 2.86 =
Weak-CTR diagnosis now works per query and excludes brand and quick-answer searches; the lost-clicks estimate drops accordingly.

= 2.85 =
Focus keywords now sync into Rank Math's real meta key; existing ones are migrated on update.

= 2.84 =
Damaged Block Markup repair now rebuilds re-nested lists and restores video embed blocks from bare URLs.

= 2.83 =
Damaged Block Markup repair now also fixes paragraphs whose closing marker was lost (the editor showed them as one invalid block).

= 2.82 =
Fixes a bug where link fixes from the dashboard could cause a post to lose its paragraphs on its next edit, and adds a scan + one-click repair for posts already affected.

= 2.81 =
Broken Video Embeds no longer flags working videos; flagged embeds show a thumbnail and can be swapped for a working URL in one click. Rank Math is detected again in the Focus Keyword Assistant.

= 2.80 =
Fixes the Upgrade to Pro buttons, which led to a page that does not exist.

= 2.79 =
Adds the plugin homepage and donate link to the WordPress.org listing. No functional changes.

= 2.78 =
Loading messages stay on screen longer, with a soft fade between them.
