PHPackages                             lexo/plugin-updater - 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. lexo/plugin-updater

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

lexo/plugin-updater
===================

WordPress plugin updater

1.1.1(2y ago)2661GPL-2.0-onlyPHPPHP &gt;=7.4.1

Since Sep 24Pushed 2y ago1 watchersCompare

[ Source](https://github.com/lexo-mpuzovic/plugin-updater)[ Packagist](https://packagist.org/packages/lexo/plugin-updater)[ Docs](https://www.lexo.ch/)[ RSS](/packages/lexo-plugin-updater/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

Plugin updater
==============

[](#plugin-updater)

WordPress plugin updater for self-hosted plugins.

---

Versioning
----------

[](#versioning)

Release tags are created with Semantic versioning in mind. Commit messages were following convention of [Conventional Commits](https://www.conventionalcommits.org/).

---

Compatibility
-------------

[](#compatibility)

- WordPress version `>=4.7`. Tested and works fine up to `6.3.2`.
- PHP version `>=7.4.1`. Tested and works fine up to `8.2.10`.

---

Installation
------------

[](#installation)

```
composer require lexo/plugin-updater
```

---

Default values
--------------

[](#default-values)

```
private array $args = [
    'basename'          => '',
    'slug'              => '',
    'version'           => '',
    'remote_path'       => '',
    'remote_args'       => [
        'timeout' => 10,
        'headers' => [
            'Accept' => 'application/json'
        ]
    ],
    'cache_key'         => 'custom_cache_key_update',
    'cache_expiration'  => DAY_IN_SECONDS,
    'cache'             => true,
];
```

---

Setter methods
--------------

[](#setter-methods)

All methods are chainable. At th end call `run()` method.

- ##### `setBasename(string $basename): PluginUpdater`

    [](#setbasenamestring-basename-pluginupdater)
- ##### `setSlug(string $slug): PluginUpdater`

    [](#setslugstring-slug-pluginupdater)
- ##### `setVersion(string $version): PluginUpdater`

    [](#setversionstring-version-pluginupdater)
- ##### `setRemotePath(string $remote_path): PluginUpdater`

    [](#setremotepathstring-remote_path-pluginupdater)
- ##### `setRemoteArgs(array $remote_args): PluginUpdater`

    [](#setremoteargsarray-remote_args-pluginupdater)
- ##### `setCacheKey(string $cache_key): PluginUpdater`

    [](#setcachekeystring-cache_key-pluginupdater)
- ##### `setCacheExpiration(float $cache_expiration): PluginUpdater`

    [](#setcacheexpirationfloat-cache_expiration-pluginupdater)
- ##### `setCache(bool $cache): PluginUpdater`

    [](#setcachebool-cache-pluginupdater)

---

Usage example
-------------

[](#usage-example)

```
(new PluginUpdater())
    ->setBasename(BASENAME)
    ->setSlug(PLUGIN_SLUG)
    ->setVersion(VERSION)
    ->setRemotePath('https://website.tld/path/info.json')
    ->setCacheKey(CACHE_KEY)
    ->setCacheExpiration(12 * HOUR_IN_SECONDS)
    ->setCache(true)
    ->run();
```

---

JSON file
---------

[](#json-file)

The file `info.json` can be called however you like but it need to be a valid JSON file. It's structure should be like this:

```
{
    "name": "Plugin name",
    "slug": "plugin-slug",
    "author": "Author Name",
    "author_profile": "https://www.domain.tld/",
    "donate_link": "https://www.domain.tld/",
    "version": "1.2.3",
    "download_url": "https://website.tld/path/plugin-slug-1.2.3.zip",
    "requires": "4.7",
    "tested": "6.0.2",
    "requires_php": "7.4.1",
    "sections": {
        "description": "Lorem ipsum description",
        "changelog": "Lorem ipsum changelog"
    },
    "banners": {
        "low": "https://website.tld/path/banner-772x250.jpg",
        "high": "https://website.tld/path/banner-1544x500.jpg"
    }
}
```

---

Filters
-------

[](#filters)

#### - `{slug}/plugin_sections`

[](#--slugplugin_sections)

*Parameters*

```
apply_filters('{slug}/plugin_sections', $args);
```

- $args (array) Sections which will be used in update info popup.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84.2% 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 ~198 days

Total

3

Last Release

933d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8f91fbe1a65b2b9ad309247271b693f882946b40241457c6aa955593d4eef469?d=identicon)[tronyx](/maintainers/tronyx)

---

Top Contributors

[![lexo-mpuzovic](https://avatars.githubusercontent.com/u/8615808?v=4)](https://github.com/lexo-mpuzovic "lexo-mpuzovic (16 commits)")[![semantic-release-bot](https://avatars.githubusercontent.com/u/32174276?v=4)](https://github.com/semantic-release-bot "semantic-release-bot (3 commits)")

---

Tags

pluginwordpressupdaterLEXO

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/lexo-plugin-updater/health.svg)

```
[![Health](https://phpackages.com/badges/lexo-plugin-updater/health.svg)](https://phpackages.com/packages/lexo-plugin-updater)
```

###  Alternatives

[afragen/git-updater

A plugin to automatically update GitHub, Bitbucket, GitLab, or Gitea hosted plugins, themes, and language packs.

3.3k1.6k](/packages/afragen-git-updater)[webdevstudios/cmb2-attached-posts

Custom field for CMB2 for creating post relationships.

13565.5k](/packages/webdevstudios-cmb2-attached-posts)[iceicetimmy/acf-post-type-selector

Post type selector for Advanced Custom Fields.

559.0k](/packages/iceicetimmy-acf-post-type-selector)

PHPackages © 2026

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