=== Cokama Link Checker ===
Contributors: littlegreenman
Tags: broken links, link checker, seo, 404, crawl
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.2.20
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Checks links on your pages in small batches and lists broken, redirected and blocked ones. It never edits your content.

== Description ==

Cokama Cokama Link Checker looks through your posts and pages for links, then checks them a few at a time so shared hosting stays happy.

**Nothing locked, no Pro version.** The full checker is in this plugin.

It never edits your posts. It does not rewrite URLs in content. You get a list with Recheck, Ignore and a CSV export, plus Edit and View links for the post each URL sits in.

= What it does =

* Collects links in batches of 50 posts so large sites do not time out
* Checks five URLs per request, with a one-second pause between batches
* Sends a HEAD request first, then a small GET if HEAD returns any 4xx or is not useful, through WordPress's safe HTTP API (private and local IPs are blocked)
* Limits itself to two requests per host in each batch, and fetches each unique URL once per scan
* Treats 404 and 410 as broken, 5xx as server errors, 401/403/429 as "Couldn't verify" (many sites block bots)
* Grades redirects by where they end up: a 301 that finishes at a 200 is Redirected; a 301 that finishes at a 404 is Broken
* Checks relative and same-site http(s) links, including the www twin of your home host
* Optional weekly background scan that re-checks every stored link (off by default)

More free plugins and help from iWorks Ireland: https://iworks.ie/wp-tools/

== Installation ==

1. Upload the `cokama-link-checker` folder to `/wp-content/plugins/`, or install the zip from Plugins → Add New.
2. Activate the plugin.
3. Open **Cokama Tools → Link Checker** and click **Start scan**.

== Frequently Asked Questions ==

= Does this change my posts? =

No. It only reads them. There is no automatic find-and-replace in this version.

= Why is a link marked "Couldn't verify" instead of broken? =

A 401, 403, 429, 999 or a timeout often means the other site blocked the checker, not that the page is gone. Those are listed separately so you can decide.

= Nothing locked, no Pro version? =

Yes. There is no paid upgrade inside this plugin.

== Screenshots ==

1. Scan running in small batches so shared hosting stays usable.
2. Results table with broken, redirected and unverified links.
3. Ignored URLs, which stay out of later scans until you unignore them.
4. Settings for post types, statuses and the optional weekly scan.

== External services ==

This plugin contacts each URL linked from your content to check it. It sends a HEAD request (and a GET of at most 32 KB if HEAD returns any 4xx or is not useful) with the User-Agent `Cokama Link Checker/1.2.20 (+https://iworks.ie/wp-tools/link-checker/)`. That happens only when you run a scan, when a weekly scan you switched on is running, or when you click Recheck. Nothing is sent to iWorks.

== Changelog ==

= 1.2.20 =
* Renamed to Cokama Link Checker. Improved file path handling and output escaping.

= 1.2.19 =
* Version aligned with the rest of the Cokama suite. No functional changes.

= 1.0.1 =
* Each scan re-checks every stored link, so the weekly scan is useful after the first run.
* Redirects are graded by the final status (a 301 that ends at a 404 is Broken).
* HEAD 4xx responses fall back to a small GET before the result is stored.
* Duplicate rows are prevented, scan ticks take a short lock, and a weekly scan will not restart a scan that is already running.
* CSV export no longer stops at 5,000 rows and prefixes formula-like cells so spreadsheets treat them as text.

= 1.0.0 =
* First public release.

== Upgrade Notice ==

= 1.2.20 =
Renamed to Cokama Link Checker. Improved file path handling and output escaping.

= 1.2.19 =
Version aligned with the rest of the Cokama suite. No functional changes.

= 1.0.1 =
Re-checks existing links on every scan, grades redirects by their final status, and upgrades the results table.

= 1.0.0 =
First public release.
