PHPackages                             skaut/phan-wordpress-stubs - 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. skaut/phan-wordpress-stubs

Abandoned → [skaut/wordpress-stubs](/?search=skaut%2Fwordpress-stubs)Library[Utility &amp; Helpers](/categories/utility)

skaut/phan-wordpress-stubs
==========================

High quality stubs for WordPress functions and classes

1.25.0(4y ago)79.7k6MITPHPPHP ^7.0 || ^8.0CI passing

Since Oct 28Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/skaut/phan-wordpress-stubs)[ Packagist](https://packagist.org/packages/skaut/phan-wordpress-stubs)[ Docs](https://github.com/marekdedic/phan-wordpress-stubs)[ RSS](/packages/skaut-phan-wordpress-stubs/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)Dependencies (3)Versions (36)Used By (0)

High quality stubs for WordPress
================================

[](#high-quality-stubs-for-wordpress)

[![Packagist Version](https://camo.githubusercontent.com/435a54125f8eedcecc1f2444408cc30478bdc3102e2b0f66a7b4120fec38c5ca/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736b6175742f776f726470726573732d73747562733f6c6f676f3d7061636b6167697374)](https://packagist.org/packages/skaut/wordpress-stubs)[![GitHub Actions Workflow Status](https://camo.githubusercontent.com/f7e723fd9fc583fb6c197e2741a3d8ea8e6ae8696ae5ace4b2538731d14ec80a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f736b6175742f776f726470726573732d73747562732f43492e796d6c3f6272616e63683d6d6173746572266c6f676f3d676974687562)](https://github.com/skaut/wordpress-stubs/actions)[![Packagist Downloads](https://camo.githubusercontent.com/65391c20ac614eaa90533cc259e70f5efd49cc73e7a7231c77672084af2a4c01/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736b6175742f776f726470726573732d73747562733f6c6f676f3d7061636b6167697374)](https://packagist.org/packages/skaut/wordpress-stubs)[![Packagist License](https://camo.githubusercontent.com/2c81b3884a70f0a244ff39439372aed6995e59e0afa57f43391452b5f1f57b3d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f736b6175742f776f726470726573732d7374756273)](https://github.com/skaut/wordpress-stubs/blob/master/LICENSE)[![Packagist Dependency Version](https://camo.githubusercontent.com/a517c876c87a62852c2a44f2f686dec86fa8c1b27a2161ba23bd69c2a7ae7e38/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f736b6175742f776f726470726573732d73747562732f7068703f6c6f676f3d706870)](https://camo.githubusercontent.com/a517c876c87a62852c2a44f2f686dec86fa8c1b27a2161ba23bd69c2a7ae7e38/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f736b6175742f776f726470726573732d73747562732f7068703f6c6f676f3d706870)

This repo contains stubs for WordPress functions and classes to be used with [phan](https://github.com/phan/phan) or [phpstan](https://phpstan.org/). This allows for better type-checking of a codebase as the stubs all have type information.

Alternatives
------------

[](#alternatives)

### [`php-stubs/wordpress-stubs`](https://github.com/php-stubs/wordpress-stubs)

[](#php-stubswordpress-stubs)

The `php-stubs/wordpress-stubs` project uses stubs that are exported directly from WordPress source code. That means that the stubs are more complete and updated quicker. On the other hand, a lot of functions and classes are documented poorly in WordPress and array types are almost never typed properly (i. e. just `array`). This package has all the stubs created by hand, so they are much more precise.

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

[](#installation)

```
$ composer require --dev skaut/wordpress-stubs
```

Add to your `.phan/config.php`:

```
return [
	'directory_list' => [
		'vendor/skaut/wordpress-stubs/stubs'
	],
	'exclude_analysis_directory_list' => [
		'vendor/skaut/wordpress-stubs/stubs'
	]
];
```

Add to your `phpstan.neon`:

```
parameters:
	scanDirectories:
	  - vendor/skaut/wordpress-stubs/stubs
	scanFiles:
	  - vendor/skaut/wordpress-stubs/stubs/WordPress/functions.php
	dynamicConstantNames:
	  - WP_DEBUG
	  - ...
```

(you have to list dynamic constants yourself)

Completeness
------------

[](#completeness)

The stubs are not complete. If you spot any missing functions or classes, please [open an issue](https://github.com/skaut/wordpress-stubs/issues/new).

###  Health Score

48

—

FairBetter than 95% of packages

Maintenance57

Moderate activity, may be stable

Popularity29

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 89.9% 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 ~30 days

Recently: every ~23 days

Total

31

Last Release

1490d ago

Major Versions

0.2.0 → 1.0.02019-11-28

PHP version history (2 changes)0.1.0PHP ^7.0

1.21.0PHP ^7.0 || ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3134692?v=4)[Marek Dědič](/maintainers/marekdedic)[@marekdedic](https://github.com/marekdedic)

---

Top Contributors

[![marekdedic](https://avatars.githubusercontent.com/u/3134692?v=4)](https://github.com/marekdedic "marekdedic (408 commits)")[![jcvignoli](https://avatars.githubusercontent.com/u/63559091?v=4)](https://github.com/jcvignoli "jcvignoli (33 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (4 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (3 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")

---

Tags

wordpressstubsstubwordpress pluginphanwordpress-themeWordPress stubs

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/skaut-phan-wordpress-stubs/health.svg)

```
[![Health](https://phpackages.com/badges/skaut-phan-wordpress-stubs/health.svg)](https://phpackages.com/packages/skaut-phan-wordpress-stubs)
```

###  Alternatives

[freemius/wordpress-sdk

Freemius WordPress SDK

303101.4k4](/packages/freemius-wordpress-sdk)[log1x/navi

A developer-friendly alternative to the WordPress NavWalker.

367633.2k7](/packages/log1x-navi)[phalcon/ide-stubs

The most complete Phalcon Framework IDE stubs library which enables autocompletion in modern IDEs.

1623.1M121](/packages/phalcon-ide-stubs)[wpmetabox/meta-box

The most powerful &amp; comprehensive plugin to create, manage, show and connect dynamic data with forms and custom fields effortlessly on WordPress.

1.2k20.5k3](/packages/wpmetabox-meta-box)[log1x/acf-editor-palette

A replica Gutenberg color picker field for Advanced Custom Fields.

100284.1k](/packages/log1x-acf-editor-palette)[hellonico/acf-country

A country field for ACF.

12193.2k](/packages/hellonico-acf-country)

PHPackages © 2026

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