=== Jeet Sanwal Menu Destination Guard ===
Contributors: jeetsanwal
Tags: navigation, menus, broken links, menu audit, block navigation
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

Review saved classic and block menu destinations for missing, restricted or uncertain WordPress targets without crawling your site.

Created by Jeet Sanwal — https://jeetsanwal.in

== Description ==

A saved menu can retain a draft, a deleted page, an old URL or an item whose parent is no longer in that menu. Jeet Sanwal Menu Destination Guard gives administrators a small read-only review screen under Tools → Menu destinations.

Choose a classic menu or an editable saved block navigation, review 25 saved rows at a time and open the native navigation editor when a link needs attention. Download the current batch as CSV if you need a review record.

* Classic post/page targets, term targets, post-type archives and custom links.
* Saved core/navigation-link and core/navigation-submenu items, including nested saved child blocks.
* Missing/trashed target and wrong post-type warnings; draft/private/non-public/password-protected target classification.
* Block destinations check both typed WordPress references and the saved URL. An existing target ID cannot make a missing, stale, external or mismatching saved URL pass.
* Native navigation tag aliases are mapped to the post_tag taxonomy.
* Local URLs that WordPress can resolve to a post are checked against that post's saved visibility.
* External URLs, page fragments, contact links, unresolved custom routes, dynamic page lists and nested navigation references stay unverified.
* Missing classic-menu parent references are flagged.
* Private, on-demand reports and formula-protected current-batch CSV export.
* CSV formula protection also covers leading Unicode controls/separators and invalid UTF-8, while retaining the original cell text.
* With optional installation reports off, no menu changes, HTTP probes, frontend assets, ads, signup, telemetry, remote service, public credit or paid tier.

== What the states mean ==

Target present: the checked saved target exists in a publicly viewable WordPress context, with supported saved URL/reference checks where applicable. It is not an HTTP health certificate.

Needs review: a saved reference is missing, trashed, the wrong type, malformed or a placeholder, or a native block link has no saved URL. A placeholder may intentionally be a menu toggle; check the design before changing it.

Restricted: the checked target is draft/private/non-public or password protected, or a taxonomy is not publicly queryable.

Unverified: this tool cannot establish the destination from supported saved WordPress data. A block URL/reference mismatch is unverified because redirects or alternative routes may be intentional. An external or unresolved URL is not automatically broken.

For native block links, the saved URL supplies the href; WordPress does not simply replace it with the typed target ID's current permalink. These fields can disagree after migrations or edits. URL-less submenus remain unverified because they may be intentional toggles, depending on navigation settings.

== Scope and limits ==

This reads explicitly selected saved navigation. It does not determine which menu is currently assigned to a theme location or rendered on each live page. The existence of a saved navigation does not prove it is in use.

No frontend requests are made and no third-party blocks, shortcodes, redirects or remote checks are run. Live HTTP errors, authentication rules, caching, custom rewrite routes, language plugins, menu filters, runtime/generated links, page-builder storage, theme templates and encoded-URL transformations are outside scope. Dynamic page lists and saved nested navigation references are identified, not recursively rendered or expanded; review referenced navigation separately.

Each report batch classifies at most 25 rows. Classic menus allow up to 100 batches (2,500 rows). Block navigation is limited to 1 MB saved content, 2,000 parsed nodes and 1,000 candidate rows. Oversized or capped navigation shows incomplete coverage. Source lists use 20 records per page, up to 1,000 pages; restricted block navigation is omitted. Reports reflect current saved data and may change if someone edits between batches.

Only manage_options plus edit_theme_options users can access the tool and export CSV. Saved block navigation additionally requires edit_post access. The plugin does not disclose private destination titles or bodies; saved labels and URLs already present in the selected menu are displayed to authorized reviewers. Keep exported CSV files private.

== Installation ==

1. Upload the plugin ZIP through Plugins → Add New → Upload Plugin.
2. Activate it and open Tools → Menu destinations.
3. Choose Classic menus or Saved block navigation.
4. Review destinations, move through batches and use Open navigation editor to make any deliberate changes.
5. Optionally download the current batch as CSV.

Self-hosted updates are installed by uploading the newer ZIP and confirming replacement in WordPress. No automatic updater is included.

== Frequently Asked Questions ==

= Does this fix or delete menu items? =
No. It is read-only. Use the native menu/navigation editor to decide what to change.

= Does Target present mean the live URL returns HTTP 200? =
No. It means the supported saved WordPress data passed the stated check. No URL is requested, and redirects, server rules and frontend runtime behavior are not checked.

= Why can a published page's block menu item be unverified? =
The native block renderer uses the saved URL. The item can point to a different post, an old route or an external address even when its saved page ID is valid. Review that URL in the navigation editor. Legitimate redirects may exist, so a mismatch is not labeled automatically broken.

= Does it check external links, telephone numbers and section anchors? =
They are identified as unverified. No external network, device behavior or page-fragment check is performed.

= Can I export the whole site in one CSV? =
No. Export is for the selected 25-row report batch. It rechecks permissions and current saved data and requires a valid nonce. Spreadsheet formula prefixes are protected. The exported labels/URLs can still be sensitive administrative information.

= Why is an empty report not a clean bill of health? =
The selected source may be empty, the batch may be beyond its rows, or parsing/size limits may have reduced coverage. Other menus, dynamic output, nested referenced navigation and inaccessible records need their own review.

= Does it need WooCommerce? =
No. It uses regular WordPress menus and saved block navigation.

== Privacy ==

With optional installation reports off, no plugin reports/settings, telemetry, external service or frontend assets are created. Reports are computed on demand. CSV downloads contain saved administrative data and should be stored appropriately. Deactivation/removal does not alter navigation or target content.

== Updating an existing installation ==

Download this plugin's individual ZIP from https://jeetsanwal.in/tools/jeet-menu-destination-guard . 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 Menu Destination Guard 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 =
* Hardened CSV formula-prefix protection for leading Unicode controls, separators and invalid UTF-8 without stripping the original cell text.

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


= 1.0.2 =
* 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.1 =
* Rechecked native saved-URL consistency, private target handling, bounded reports and protected CSV; refreshed release metadata.

= 1.0.0 =
* Initial release: bounded read-only classic/block destination review, saved-URL/reference consistency checks and current-batch CSV export.
