=== Jeet Sanwal Anchor Checker ===
Contributors: jeetsanwal
Tags: anchor links, content audit, broken links, documentation
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Find section links missing from saved WordPress content, letter-case mismatches, and duplicate HTML anchors. Small batches, no crawling, no content edits.

== Description ==

Jeet Sanwal Anchor Checker helps maintain tutorials, documentation, and growing content libraries. When a heading changes, a section link may no longer point where you expect.

Open Tools > Anchor Checker, choose your public content types, and start a scan. The checker reads published content in small batches and gives you a report with an edit-source link and a live-target link.

Features:

* Same-page and cross-page fragment links in stored content.
* Exact, case-sensitive HTML ID matching, including percent-encoded UTF-8 fragments.
* Letter-case suggestions and duplicate-ID findings.
* Legacy <a name="..."> anchors and saved Gutenberg HTML.
* Published posts, pages, and public custom post types.
* Start, pause, resume, progress, finding filters, and a paginated report.
* Administrator-only access; no frontend scripts or styles.
* With optional installation reports off, no ads, Pro version, account, tracking, external services, or remote crawling.

= Accurate scope =

This plugin audits saved post_content, not the complete rendered website. It never executes shortcodes, dynamic blocks, content filters, or arbitrary rendering callbacks. A finding says "Not found in checked content" because a theme or JavaScript might supply an ID at runtime.

Targets with detected shortcodes, dynamic/third-party blocks, supported builder metadata, incomplete snapshots, or URLs outside the chosen content need a live-page check. Theme templates, menus, widgets, comments, archives, external websites, builder-only content, generated table-of-contents IDs, and JavaScript-generated links are outside this scan. Saved Gutenberg HTML with explicit anchors is included; dynamically generated block HTML is not rendered.

The checker does not fetch URLs, verify HTTP status, follow redirects, automatically repair links, or guarantee that a link is broken on the live page. Links with empty fragments, browser-top fragments, text-only fragment directives, non-HTTP schemes, and external hosts are skipped or treated as browser navigation where appropriate.

= Bounded work =

Each request reads at most 5 items or checks at most 50 distinct stored hrefs. A scan covers up to 2,000 items, 8 MB of snapshots, and 1,000 stored findings. Each content item is limited to 1 MB, 1,500 anchors, and 1,000 fragment hrefs. Visible notices explain limits; missing targets in incomplete content remain unverified. Narrow the selected content types for a large site.

Keep the tools tab open during a scan. Closing it stops further requests; returning lets you resume the saved scan. Results reflect the content captured when indexed; scan again after editing. Scans are isolated per administrator and per WordPress site.

== Installation ==

1. Upload the jeet-anchor-checker ZIP in Plugins > Add New > Upload Plugin.
2. Activate Jeet Sanwal Anchor Checker.
3. Open Tools > Anchor Checker.
4. Select the content types and choose Start new scan.

== Frequently Asked Questions ==

= Does this change my links? =

No. It reports findings and opens the existing WordPress editor for you to review and fix content.

= Is a "Not found" finding definitely a broken live link? =

No. It means the target ID was absent from the checked content snapshot. Check the live target first: your theme, scripts, or another plugin may add it. Detected dynamic or incomplete content is marked for a live-page check instead.

= Does it include private or password-protected pages? =

No. Only published, publicly viewable, non-password-protected content in the selected public post types is included.

= Does it crawl external URLs? =

No. URL resolution uses the current site's known WordPress posts and permalinks without HTTP requests. External hosts, files, and non-post URLs are not crawled.

= Where is the report stored? =

Temporary WordPress transients store parsed IDs, links, post titles, URLs, and the report. They are private to each administrator and site. Findings are shown only while their source remains public, non-password-protected and editable by the current user. Source titles and permalinks are refreshed when the report is opened, and restricted targets no longer provide cached anchor suggestions. Scan totals describe the saved scan; start again for current totals. Reports expire after an hour of inactivity; individual snapshots expire one hour after they were read. An expired snapshot becomes unverified. Start a fresh scan if a long pause expires the data. Uninstall removes this plugin's temporary data on the current site. WordPress or your persistent object cache may keep expired keys until its normal expiry cleanup.

= Is anything sent to Jeet Sanwal or a third party? =

With optional installation reports off, no. The plugin has no telemetry, advertising, account signup, remote API, or frontend credit link.

= Can a multisite network administrator use this? =

Yes, within each site's Tools screen when they have manage_options. Reports belong to the current site. There is no network-wide scanner.

== Updating an existing installation ==

Download this plugin's individual ZIP from https://jeetsanwal.in/tools/jeet-anchor-checker . Make a normal site backup and try the update on staging first. In WordPress, use Plugins > Add New > Upload Plugin and choose Replace current with uploaded when WordPress detects the existing installation. Keep the same plugin folder; do not uninstall/delete the plugin as an update step. Confirm the displayed version is 1.0.5, then reopen the plugin's normal screen and check one representative workflow described above. Clear relevant page caches if public output remains stale.

Updates are installed manually; a matching Update URI prevents unrelated directory plugins from replacing this package, but does not provide an update service. If replacement fails, check hosting upload limits and write permissions before retrying. To roll back, replace the plugin files with your saved previous ZIP; file replacement alone does not restore database records or deleted files. Use your site backup when data restoration is needed. Read this plugin's retention notes before deliberately uninstalling it.

Author and support: Jeet Sanwal — https://jeetsanwal.in/contact

== Optional installation reports ==

Installation reports are optional and OFF by default. Installing, activating, or using this product does not submit a report. Administrators can choose consent separately for each product under Settings > Jeet Sanwal Reports. All product features remain available with reporting off.

After explicit consent, the client sends the website URL, a random installation ID, product/WordPress/PHP versions, reported state, and an observed activation timestamp when available to https://jeetsanwal.in/api/v1/plugin-reports. While that product is active and consent remains enabled, a daily WordPress cron check-in can update its last-known status. WP-Cron depends on site traffic and hosting; it is not a continuous monitor.

Pause stops future reports without deleting records already shared. Forget requests deletion of the remote installation entry and history, retrying deletion if delivery fails. Records automatically expire after 90 days without a check-in. The plugin does not send page content, files, database exports, administrator email addresses, or raw IP addresses. Server rate limiting keeps a keyed IP hash for up to 24 hours; ordinary hosting access logs are governed separately by the privacy policy.

Review the fields and consent before enabling reporting. Read https://jeetsanwal.in/privacy for the reporting endpoint, retention, and deletion details. Reporting does not authorize remote control, automatic updates, or access to the website.

== Changelog ==

= 1.0.5 =
* Updated the product display name to Jeet Sanwal Anchor Checker and retained the Jeet Sanwal author website.
* Added voluntary installation/status reports with per-product consent OFF by default, pause/forget controls, and documented fields and retention.
* Preserved existing identifiers, stored data, permissions, and earlier release history.


= 1.0.4 =
* Added a complete US English installation and update guide; kept documented permissions, limits and manual rollback steps.


= 1.0.3 =
* Clarified the manual replacement, verification and rollback workflow, with direct author support details.
* Rechecked package metadata, source/archive consistency and existing isolated regressions.


= 1.0.2 =
* Recheck current source visibility and edit access before returning cached findings, then refresh displayed titles and permalinks.
* Recheck target access and remove stale cached anchor suggestions when a target becomes restricted.

= 1.0.1 =
* Make batch-lock claims atomic and release only the exact owner, including safe cleanup of older timestamp locks.

= 1.0.0 =
* First release: bounded stored-content scans, case-aware anchor checks, duplicate IDs, dynamic-content coverage notes, pause/resume, and filtered reports.
