=== Mashlink Auditor ===
Contributors: sikanderjafar
Tags: internal links, seo, broken links, redirects, anchor text
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.7.8
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Audit internal links: see which posts and pages link to each other, the anchor text used, and fix broken or redirected links.

== Description ==

Mashlink Auditor, built by [WPmash](https://wpmash.com), is an internal link auditor. It lists which posts, pages and custom post types contain internal links, which anchor text each link uses, and which links are broken or redirected.

**Link report**

* Number of internal links in and out for every published post, page and custom post type.
* Colour tags for isolated content, content with no incoming links, dead ends (no outgoing links) and connected content.
* Sortable columns, search by title or URL, and a post type filter.
* Click an In or Out number to see which pages link and with which anchor text.

**Anchor text tracking**

* Every anchor text with the number of times it is used and the pages that use it.
* An anchor is flagged in red as overused only when the same anchor links to one page more than 4 times AND makes up more than 15% of the links to that page. Anchors spread across many pages (like "read more") are not flagged. Both numbers can be changed with the `wpmash_ila_anchor_limit` and `wpmash_ila_anchor_share` filters.
* An Ignore button for anchors that are fine to repeat.

**Deep scan**

* Reads the rendered page, so links added by templates, theme builders, page builders and query loops are counted.
* Reads synced patterns and HTML stored in custom fields such as ACF.

**Broken and redirected links**

* Requests each internal link from your site and reports errors, redirects, redirect chains and redirect loops.
* Shows the link as written, the URL it should point to, the anchor text and every page that contains it, with an Edit link.

**Extras**

* CSV export of any tab, with the current filters applied.
* A Diagnose box that shows what the scan sees on a single page.
* Pages are rescanned automatically when saved.
* No custom database tables and no front-end output.

= Compatibility =

The plugin has been tested with GeneratePress and GenerateBlocks only. It does not depend on a specific theme, but other themes and page builders have not been tested. Test on a staging copy and keep a backup before installing on a live site.

= Privacy =

The plugin sends no data to third parties and loads no external code. The deep scan and the link check request your own site's URLs from your server, and only administrators can start them. When a link redirects to another website, the plugin reports the destination and does not request it.

== Screenshots ==

1. Content tab with colour-coded link status.
2. Anchor texts tab with overused anchors flagged.
3. Popup showing which pages link and with which anchor text.
4. Broken and redirected links tab.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`, or install the zip from Plugins > Add New > Upload Plugin.
2. Activate the plugin.
3. Open Tools > Mashlink Auditor (or click Settings on the Plugins screen) and click Run full scan.
4. Open the Broken & redirected links tab and click Check links.

== Frequently Asked Questions ==

= Does it change my content? =

No. The plugin reads content only. It stores one post meta entry per post and a few options, and removes them when the plugin is deleted.

= Why does a page show no links after a deep scan? =

Some hosts and firewalls block a site from requesting its own pages. Use the Diagnose box at the bottom of the plugin page to see the HTTP response and the links found on that page.

== Changelog ==

= 1.7.8 =
* Overused anchors are now judged per page: the same anchor must be used more than 4 times for one page and be over 15% of that page's links. Big sites no longer get flags just for reaching 5 uses.
* Added a Settings link on the Plugins screen.
* Added a "View details" link on the Plugins screen that opens the WordPress.org plugin information pop-up.
* The admin page and menu are now called Mashlink Auditor.
* Image-only and empty links are no longer listed; only links with readable anchor text are audited.
* Only links inside the body text are counted. Previous/next post links, pagination, categories, tags, author and meta links, breadcrumbs, related-post lists, sidebars and other layout areas are ignored.
* Button links (theme buttons, WordPress and GenerateBlocks buttons, builder buttons) are left out by default. A new "Include button links" checkbox adds them.
* Added a "How we measure overuse" tooltip on the report.
* The Content tab now lists the most linked-to pages first, with an orange "Top Linked Page" badge on the single most linked page. Click the Status column to sort by status instead.
* The red overused-anchor box was removed from the Content tab; overused anchors are shown on the Anchor texts tab.
* Added a note that Deep scan is slower and can be skipped.
* Re-run the full scan after updating to rebuild the report.

= 1.7.7 =
* The link checker no longer requests other websites. A redirect that leaves the site is reported with its destination and is not followed.

= 1.7.6 =
* Author and company set to WPmash (wpmash.com).

= 1.7.5 =
* Renamed to Mashlink Auditor.

= 1.7.4 =
* Renamed.

= 1.7.3 =
* Renamed.

= 1.7.2 =
* Tested with WordPress 7.1.
* Renamed to Mashlink Auditor.
* Code standard fixes: translator comments, input sanitizing, removed set_time_limit and suppress_filters.

= 1.7.1 =
* Links stored in custom fields (ACF and similar) are now scanned.

= 1.7.0 =
* Added the Diagnose box.

= 1.6.0 =
* Added CSV export.

= 1.5.0 =
* Added the Broken & redirected links tab.

= 1.4.0 =
* Deep scan works with any theme or builder. Added search.
