PHPackages                             piedweb/linksimprover - 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. piedweb/linksimprover

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

piedweb/linksimprover
=====================

Increase your search rankings by improve your internal linking.

v0.0.8(5y ago)120.7k↓49.7%1MITPHPPHP ^7.4|^8.0

Since Nov 28Pushed 5y ago1 watchersCompare

[ Source](https://github.com/PiedWeb/LinksImprover)[ Packagist](https://packagist.org/packages/piedweb/linksimprover)[ Docs](https://dev.piedweb.com)[ RSS](/packages/piedweb-linksimprover/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (4)Versions (9)Used By (1)

[![PHP Packages Open Source](https://raw.githubusercontent.com/PiedWeb/piedweb-devoluix-theme/master/src/img/logo_title.png)](https://dev.piedweb.com)

Links Improver
==============

[](#links-improver)

**Improve the navigability of a website** by improving your internal linking ... so **Increase your search rankings** (SEO).

[![Latest Version on Packagist](https://camo.githubusercontent.com/dfbb5b0be9d6534770bacb10fe65ddf48277d15be82eff5ba9ee6ec76773cc2e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706965647765622f4c696e6b73496d70726f7665722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/piedweb/LinksImprover)[![GitHub Tests Action Status](https://camo.githubusercontent.com/24116dce732951c4cbf882dabf40dded454945283f18cdf156d3395a7604046b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f706965647765622f4c696e6b73496d70726f7665722f54657374733f6c6162656c3d7465737473)](https://github.com/PiedWeb/LinksImprover/actions)[![Total Downloads](https://camo.githubusercontent.com/3b09181b715a2405b5aee39f3b2c8d6ecea189599c1d3d41f9dce86fdbb8dc95/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f706965647765622f4c696e6b73496d70726f7665722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/piedweb/LinksImprover)

**You are not a developper and want a ready product like a wordpress plugin, see [Link Whisper](https://linkwhisper.com/ref/644/) (af link).**

Description
-----------

[](#description)

From a list (raw or file) with this format :

> url,kws\[separate by `,` and can use wildcard (`*`)\],force (default 0),counter

(force and counter are facultatives)

The code analyse a content to extrat existing links and word count.

Then, from our list, it adds links to text from one kws suggested if :

- the kw is in the text (for sure) (en vérifiant que le précédent tag est un &lt;p.\*&gt;),
- the link does not exist yet
- the number of link is not exceeded a number (eg: 10 links in the content) or a ratio (eg: 1 link for 50 words)

Then update link counter

If you edit a second content, I advice you to `reOrder` the link list to permit link rotation (the just created links will go at the end of the list respecting their `force` value if it's set).

Support this package
--------------------

[](#support-this-package)

By speaking about and link `piedweb.com` on your website.

Usage
-----

[](#usage)

### Installation

[](#installation)

```
composer require piedweb/linksimprover
```

### Example

[](#example)

```
include 'vendor/autoload.php';

use Piedweb\LinksImprover\LinksManager;
use Piedweb\LinksImprover\LinksImprover;

$content = 'My blog post content where I want to add few links to other page to get better pos on google.';

$base = 'https://piedweb.com'; // my blog

// Get your page you want increment the list and on wich kw
$linksList = 'url,kws,force,counter
https://piedweb.com/,"Pied Web,Robin from Pied Web"
https://google.com/,"Google,google.com"';

$linksManager = LinksManager::load($linksList, $base);

$linksImprover = new LinksImprover($content);

$newContent = $linksImprover->improve($linksManager, 1 / 20, 'style=color:black'); // 1 link every 20 words max, it's huge :)

echo $newContent;

// Then reorder link list before submit a new content

$linksManager->reOrder();
```

Will return

```

    My blog post content where I want to add few links to other page to get
    better pos on google.

```

Other method

```
// Go further
/**
 * @param array
 */
$linksImprover->setTagsInsideLinkCouldBeAdded(LinksImprover::TAGS_EXTENDED);
// Per default, the links could be added in p, strong, b, em, i and span.
// Extenged tags add div and h[2-6]
// You can suggest an array

// Reporting
$linksImprover->getAddedLinksCount();
$linksImprover->getAddedLinks();
$linksImprover->getExistingLinks();

class:LinksImproverBBCode // Same api and search and replace for [url=*][/url]
```

### Warning (and benefit)

[](#warning-and-benefit)

It don't compare link with or without host. So you can use it to link external website...

but be careful to ManageLinks with host and having a proper content (link without host).

Testing
-------

[](#testing)

```
composer test
```

Credits
-------

[](#credits)

- Robin from [Pied Web](https://piedweb.com)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~7 days

Recently: every ~13 days

Total

8

Last Release

1966d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/afce4cf517928a50560237f1410d5957271fd808671b2216687ecf1422adaee0?d=identicon)[Robin D.](/maintainers/Robin%20D.)

---

Top Contributors

[![RobinDev](https://avatars.githubusercontent.com/u/3944894?v=4)](https://github.com/RobinDev "RobinDev (2 commits)")

---

Tags

piedwebLinksImprover

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/piedweb-linksimprover/health.svg)

```
[![Health](https://phpackages.com/badges/piedweb-linksimprover/health.svg)](https://phpackages.com/packages/piedweb-linksimprover)
```

###  Alternatives

[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

23.6k69.4k](/packages/grumpydictator-firefly-iii)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

744284.3k34](/packages/civicrm-civicrm-core)[craftcms/feed-me

Import content from XML, RSS, CSV or JSON feeds into entries, categories, Craft Commerce products, and more.

294943.4k27](/packages/craftcms-feed-me)[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

5.0k4.9k](/packages/shlinkio-shlink)[azuracast/azuracast

The AzuraCast self-hosted web radio station management suite.

3.9k27.8k](/packages/azuracast-azuracast)[oat-sa/tao-core

TAO core extension

66140.1k108](/packages/oat-sa-tao-core)

PHPackages © 2026

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