PHPackages                             afragen/add-plugin-dependency-api - 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. afragen/add-plugin-dependency-api

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

afragen/add-plugin-dependency-api
=================================

Library that helps WordPress plugin dependency management.

0.4.8(3y ago)6411MITPHPPHP &gt;=5.6

Since Sep 2Pushed 3y ago1 watchersCompare

[ Source](https://github.com/afragen/add-plugin-dependency-api)[ Packagist](https://packagist.org/packages/afragen/add-plugin-dependency-api)[ GitHub Sponsors](https://github.com/afragen)[ RSS](/packages/afragen-add-plugin-dependency-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (13)Used By (0)

Add Plugin Dependency API
=========================

[](#add-plugin-dependency-api)

- Contributors: [Andy Fragen](https://github.com/afragen), [contributors](https://github.com/afragen/add-plugin-dependency-api/graphs/contributors)
- Tags: plugin dependency
- Requires at least: 6.0
- Requires PHP: 5.6
- Stable tag: main
- Donate link:
- License: MIT

Composer library for adding a plugin dependency response based upon use with Git Updater v12 or greater.

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

[](#description)

This is an example to developers of non dot-org plugins that wish to take advantage of the Plugin Dependencies feature from the `Requires Plugins` header.

You can use **composer** to install this package within your WordPress plugin / theme.

**Please ensure you are using the latest version of this framework in your `composer.json`**

1. Within your plugin or theme root folder, run the following command:

```
composer require afragen/add-plugin-dependency-api
```

2. Add a filter to your plugin that requires a dependency that returns an array or JSON response containing a REST endpoint that returns a valid `plugins_api()` response.

A query arg of the plugin slug, `?slug=my-plugin-dependency`, will be passed to the endpoint returned from the filter. The slug originates from the `Require Plugins` header.

```
// Add the sites with REST enpoints that return plugins_api() data when passed `slug` query arg.
// You can also return URL to a JSON file containing the appropriate data.
add_filter(
	'plugin_dependency_endpoints',
	function () {
		return [ 'https://git-updater.com/wp-json/git-updater/v1/plugins-api/' ];
	}
);
```

To see an example REST endpoint return view  in the browser.

Development
-----------

[](#development)

PRs are welcome against the `develop` branch.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

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

Recently: every ~37 days

Total

12

Last Release

1156d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/82779a185fccde41e1dd3b914bde84cd6be76c8dcb8f6b983f461c8f5687a87e?d=identicon)[afragen](/maintainers/afragen)

---

Top Contributors

[![afragen](https://avatars.githubusercontent.com/u/1296790?v=4)](https://github.com/afragen "afragen (17 commits)")

### Embed Badge

![Health badge](/badges/afragen-add-plugin-dependency-api/health.svg)

```
[![Health](https://phpackages.com/badges/afragen-add-plugin-dependency-api/health.svg)](https://phpackages.com/packages/afragen-add-plugin-dependency-api)
```

###  Alternatives

[sylvainjule/locator

A map &amp; geolocation field, built on top of open-source services / Mapbox

11237.3k1](/packages/sylvainjule-locator)[dillingham/nova-detail-link

A Laravel Nova field.

22121.1k2](/packages/dillingham-nova-detail-link)[laravel-enso/comments

Comments Manager for Laravel Enso

1139.6k1](/packages/laravel-enso-comments)[godbout/alfred-workflow-scriptfilter

Generate Alfred 3 or 4 Workflow Results in PHP with a laugh.

173.7k1](/packages/godbout-alfred-workflow-scriptfilter)

PHPackages © 2026

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