PHPackages                             helsingborg-stad/broken-link-detector - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. helsingborg-stad/broken-link-detector

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

helsingborg-stad/broken-link-detector
=====================================

Detects broken links

4.2.30(1mo ago)016.1k↓49.3%3[1 issues](https://github.com/helsingborg-stad/broken-link-detector/issues)[6 PRs](https://github.com/helsingborg-stad/broken-link-detector/pulls)3MITPHPPHP &gt;=8.2CI passing

Since Jun 21Pushed 1mo ago10 watchersCompare

[ Source](https://github.com/helsingborg-stad/broken-link-detector)[ Packagist](https://packagist.org/packages/helsingborg-stad/broken-link-detector)[ RSS](/packages/helsingborg-stad-broken-link-detector/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (10)Dependencies (42)Versions (101)Used By (3)

Broken Link Detector 4
======================

[](#broken-link-detector-4)

The **Broken Link Detector** plugin identifies and, where possible, fixes broken links in both content and metadata. Key features include:

- Probing both internal and external URLs stored in content and metadata to verify their validity.
- Generating a list of broken links, viewable by editors in the admin panel.
- Allowing administrators to create a blacklist of domains that should be excluded from the link-checking process.
- Displaying a warning (via a tooltip) for images that cannot be fetched from blacklisted external domains.

Admin UI
========

[](#admin-ui)

This plugin adds two admin menu options:

Tools &gt; Broken links summary
-------------------------------

[](#tools--broken-links-summary)

This page presents a summary of all links that was found to be broken in the last classification. This page is avabile for users that can edit posts.

Settings &gt; Broken links settings
-----------------------------------

[](#settings--broken-links-settings)

This page gives an administrator the ability to configure the plugin. A whitelist of domains is provided, and the ability to enable context detection feature.

Cron actions
============

[](#cron-actions)

This plugin does not utilize the built on WordPress cron functionality. We instead recommend to setup the cli actions in the native unix crons.

Cli documentation
=================

[](#cli-documentation)

Broken link detector does not rely on scheduled actions due to its resource intensive nature. Instead a set of cli actions is provided to maintain the link registry.

Cli commands
------------

[](#cli-commands)

All broken links cli commands are placed under **broken-link-detector** prefix. To get a up to date index of all options please use the following command:

`wp broken-link-detector --info`

### Install, Uninstall &amp; Reinstall

[](#install-uninstall--reinstall)

This command allows you to install, reinstall or uninstall the database table required for broken link registry.

`wp broken-link-detector database --[install, uninstall, reinstall]`

### Find links

[](#find-links)

This command will scan your sites content and meta data for links, and register them in the link registry. The links will not show up in the summary, util they have been classified as broken. The flags in this command is optional, and will default to true.

`wp broken-link-detector find-links --meta=true --content=true`

### Classify Links

[](#classify-links)

This command will asses and classify each found link to check if the link is valid or not. This is a resource intensive action, therefore a limit can be applied to classify a subset of links. This function utilizes the confuration value in recheckInterval, to prevent calls to frequent of external services.

`wp broken-link-detector classify-links --limit=[NUMBER]`

Filter Documentation
====================

[](#filter-documentation)

This document provides an overview of the available filters within the `BrokenLinkDetector\Config` class. All filters are prefixed with `BrokenLinkDetector/Config`.

Filters
-------

[](#filters)

### `BrokenLinkDetector/Config/getDatabaseVersionKey`

[](#brokenlinkdetectorconfiggetdatabaseversionkey)

**Description:**
Filter the key used for the database version.

**Default Value:**
`'broken_link_detector_db_version'`

### `BrokenLinkDetector/Config/getDatabaseVersion`

[](#brokenlinkdetectorconfiggetdatabaseversion)

**Description:**
Filter the current database version from the options table.

**Default Value:**
`'2.0.0'`

### `BrokenLinkDetector/Config/getTableName`

[](#brokenlinkdetectorconfiggettablename)

**Description:**
Filter the name of the table that stores broken links.

**Default Value:**
`'broken_links_detector'`

### `BrokenLinkDetector/Config/getPluginUrl`

[](#brokenlinkdetectorconfiggetpluginurl)

**Description:**
Filter the plugin URL.

**Default Value:**
The value provided during object construction for `pluginUrl`.

### `BrokenLinkDetector/Config/getPluginPath`

[](#brokenlinkdetectorconfiggetpluginpath)

**Description:**
Filter the plugin path.

**Default Value:**
The value provided during object construction for `pluginPath`.

### `BrokenLinkDetector/Config/getPluginFieldsPath`

[](#brokenlinkdetectorconfiggetpluginfieldspath)

**Description:**
Filter the path where fields are located.

**Default Value:**
The plugin path appended with `source/fields`.

### `BrokenLinkDetector/Config/getTextDomain`

[](#brokenlinkdetectorconfiggettextdomain)

**Description:**
Filter the text domain.

**Default Value:**
`'broken-link-detector'`

### `BrokenLinkDetector/Config/linkUpdaterBannedPostTypes`

[](#brokenlinkdetectorconfiglinkupdaterbannedposttypes)

**Description:**
Filter the post types where link repair (link updater) should not run.

**Default Value:**
`['attachment', 'revision', 'acf', 'acf-field', 'acf-field-group']`

### `BrokenLinkDetector/Config/linkDetectBannedPostTypes`

[](#brokenlinkdetectorconfiglinkdetectbannedposttypes)

**Description:**
Filter the post types that should not be checked for broken links.

**Default Value:**
`['attachment', 'revision', 'acf', 'acf-field', 'acf-field-group']`

### `BrokenLinkDetector/Config/linkDetectAllowedPostStatuses`

[](#brokenlinkdetectorconfiglinkdetectallowedpoststatuses)

**Description:**
Filter the post types that should not be checked for broken links based on status.

**Default Value:**
`['publish', 'private', 'password']`

### `BrokenLinkDetector/Config/responseCodesConsideredBroken`

[](#brokenlinkdetectorconfigresponsecodesconsideredbroken)

**Description:**
Filter the response codes that are considered broken.

**Default Value:**
`[400, 403, 404, 410, 500, 502, 503, 504]`

### `BrokenLinkDetector/Config/checkIfDnsRespondsBeforeProbingUrl`

[](#brokenlinkdetectorconfigcheckifdnsrespondsbeforeprobingurl)

**Description:**
Filter to determine if DNS should respond before probing the URL.

**Default Value:**
`true`

### `BrokenLinkDetector/Config/getMaxRedirects`

[](#brokenlinkdetectorconfiggetmaxredirects)

**Description:**
Filter the number of redirects to follow.

**Default Value:**
`5`

### `BrokenLinkDetector/Config/getTimeout`

[](#brokenlinkdetectorconfiggettimeout)

**Description:**
Filter the timeout for the request.

**Default Value:**
`5`

### `BrokenLinkDetector/Config/getRecheckInterval`

[](#brokenlinkdetectorconfiggetrecheckinterval)

**Description:**
Filter the interval for rechecking broken links in minutes.

**Default Value:**
`720`

### `BrokenLinkDetector/Config/getDomainsThatShouldNotBeChecked`

[](#brokenlinkdetectorconfiggetdomainsthatshouldnotbechecked)

**Description:**
Filter the domains that should not be checked for broken links. These will be registered, but always return `null`.

**Default Value:**
An empty array if no domains are set in ACF fields.

### `BrokenLinkDetector/Config/isContextCheckEnabled`

[](#brokenlinkdetectorconfigiscontextcheckenabled)

**Description:**
Filter to enable/disable context check based on configuration and URL.

**Default Value:**
`false`

### `BrokenLinkDetector/Config/getContextCheckUrl`

[](#brokenlinkdetectorconfiggetcontextcheckurl)

**Description:**
Filter the URL to probe for the context check.

**Default Value:**
The value from the ACF field or an empty string if not set.

### `BrokenLinkDetector/Config/getContextCheckTimeout`

[](#brokenlinkdetectorconfiggetcontextchecktimeout)

**Description:**
Filter the timeout in milliseconds for the context check.

**Default Value:**
`3000`

### `BrokenLinkDetector/Config/getContextCheckDomainsToDisable`

[](#brokenlinkdetectorconfiggetcontextcheckdomainstodisable)

**Description:**
Filter the domains that should be disabled when the context check fails.

**Default Value:**
The domains retrieved by the `getDomainsThatShouldNotBeChecked` method.

### `BrokenLinkDetector/Config/getContextCheckSuccessClass`

[](#brokenlinkdetectorconfiggetcontextchecksuccessclass)

**Description:**
Filter the class to be applied for a successful context check.

**Default Value:**
`'context-check-avabile'`

### `BrokenLinkDetector/Config/getContextCheckFailedClass`

[](#brokenlinkdetectorconfiggetcontextcheckfailedclass)

**Description:**
Filter the class to be applied for a failed context check.

**Default Value:**
`'context-check-unavabile'`

### `BrokenLinkDetector/Config/getContextCheckTooltipText`

[](#brokenlinkdetectorconfiggetcontextchecktooltiptext)

**Description:**
Filter the tooltip text for a disabled link due to context failure.

**Default Value:**
The value from the ACF field or `'Link unavabile'` if not set.

### `BrokenLinkDetector/Config/getCommandNamespace`

[](#brokenlinkdetectorconfiggetcommandnamespace)

**Description:**
Filter the namespace for the WP CLI command.

**Default Value:**
`'broken-link-detector'`

Example Usage
-------------

[](#example-usage)

To modify the filter for the database version key, you can use the following code in your plugin or theme:

```
add_filter('BrokenLinkDetector/Config/getDatabaseVersionKey', function($versionKey) {
    return 'custom_version_key';
});
```

###  Health Score

62

—

FairBetter than 99% of packages

Maintenance93

Actively maintained with recent releases

Popularity26

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity92

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~48 days

Recently: every ~30 days

Total

76

Last Release

37d ago

Major Versions

1.4.0 → 2.0.02022-10-25

2.0.0 → 3.0.22023-09-26

3.0.6 → 4.0.02024-11-14

PHP version history (2 changes)4.0.0PHP &gt;=8.1

4.2.20PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/f46fe64973c3e89d15c745c0bf601c25983bafea81d30e64d4bf813a6f8c8c7c?d=identicon)[sebastianthulin](/maintainers/sebastianthulin)

---

Top Contributors

[![sebastianthulin](https://avatars.githubusercontent.com/u/797129?v=4)](https://github.com/sebastianthulin "sebastianthulin (21 commits)")[![thorbrink](https://avatars.githubusercontent.com/u/1064724?v=4)](https://github.com/thorbrink "thorbrink (12 commits)")[![Sven65](https://avatars.githubusercontent.com/u/10225982?v=4)](https://github.com/Sven65 "Sven65 (7 commits)")[![pbrotherton](https://avatars.githubusercontent.com/u/19387424?v=4)](https://github.com/pbrotherton "pbrotherton (5 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (2 commits)")[![nRamstedt](https://avatars.githubusercontent.com/u/16800993?v=4)](https://github.com/nRamstedt "nRamstedt (1 commits)")[![NiclasNorin](https://avatars.githubusercontent.com/u/103985736?v=4)](https://github.com/NiclasNorin "NiclasNorin (1 commits)")

---

Tags

getmunicipio

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/helsingborg-stad-broken-link-detector/health.svg)

```
[![Health](https://phpackages.com/badges/helsingborg-stad-broken-link-detector/health.svg)](https://phpackages.com/packages/helsingborg-stad-broken-link-detector)
```

###  Alternatives

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.5k10](/packages/helsingborg-stad-municipio)[symfony/symfony

The Symfony PHP framework

31.4k87.2M2.2k](/packages/symfony-symfony)[symfony/mime

Allows manipulating MIME messages

2.8k716.9M1.4k](/packages/symfony-mime)[getkirby/cms

The Kirby core

1.5k584.8k472](/packages/getkirby-cms)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M421](/packages/drupal-core-recommended)[oxid-esales/oxideshop-metapackage-ce

This is OXID eShop compilation metapackage.

13500.5k21](/packages/oxid-esales-oxideshop-metapackage-ce)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
