PHPackages                             andrewjdawes/wp-package-parser - 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. andrewjdawes/wp-package-parser

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

andrewjdawes/wp-package-parser
==============================

v1.5.0(9mo ago)020MITPHPPHP ^8.0CI passing

Since Jul 29Pushed 9mo agoCompare

[ Source](https://github.com/AndrewJDawes/wp-package-parser)[ Packagist](https://packagist.org/packages/andrewjdawes/wp-package-parser)[ RSS](/packages/andrewjdawes-wp-package-parser/feed)WikiDiscussions main Synced 1mo ago

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

WP Package Parser [![Develop branch](https://github.com/AndrewJDawes/wp-package-parser/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/AndrewJDawes/wp-package-parser/actions/workflows/ci.yml/badge.svg?branch=develop) [![GitHub issues](https://camo.githubusercontent.com/634c101579516630faca1c01990ece787b58edc61cda88fc459480bcbeacc3e5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f416e647265774a44617765732f77702d7061636b6167652d7061727365722e737667)](https://github.com/AndrewJDawes/wp-package-parser/issues) [![GitHub license](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://raw.githubusercontent.com/AndrewJDawes/wp-package-parser/master/LICENSE)
=============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#wp-package-parser---)

A PHP library for parsing WordPress plugin and theme metadata. Point it at a ZIP package and it will:

- Tell you whether it contains a plugin or a theme.
- Give you the metadata from the comment header (Version, Description, Author URI, etc).
- Parse readme.txt into a list of headers and sections.
- Convert readme.txt contents from Markdown to HTML.

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

[](#installation)

It is recommended to [install the composer package](https://packagist.org/packages/andrewjdawes/wp-package-parser).

```
composer require andrewjdawes/wp-package-parser
```

Basic usage
-----------

[](#basic-usage)

### Extract plugin metadata:

[](#extract-plugin-metadata)

```
require 'vendor/autoload.php';
$package = new AndrewJDawes\WPPackageParser\WPPackage('/var/path/plugin.zip');
print_r($package->getMetaData());
```

Sample output:

```
Array
(
    [name] => Hello Dolly
    [plugin_uri] => https://wordpress.org/plugins/hello-dolly/
    [version] => 1.6
    [description] => This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from Hello, Dolly in the upper right of your admin screen on every page.
    [author] => Matt Mullenweg
    [author_profile] => http://ma.tt/
    [text_domain] => hello-dolly
    [domain_path] =>
    [network] =>
    [plugin] => hello-dolly/hello.php
    [contributors] => Array
        (
            [0] => matt
        )

    [donate] =>
    [tags] => Array
        (
        )

    [requires] => 4.6
    [tested] => 4.7
    [stable] => 1.6
    [short_description] => This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong.
    [sections] => Array
        (
            [description] =>
This is not just a plugin, it symbolizes the hope and enthusiasm of an entire generation summed up in two words sung most famously by Louis Armstrong: Hello, Dolly. When activated you will randomly see a lyric from Hello, Dolly in the upper right of your admin screen on every page.

        )

    [readme] => 1
    [slug] => hello-dolly
)

```

### Extract theme metadata:

[](#extract-theme-metadata)

```
require 'vendor/autoload.php';
$package = new AndrewJDawes\WPPackageParser\WPPackage('/var/path/theme.zip');
print_r($package->getMetaData());
```

Sample output:

```
Array
(
    [name] => Twenty Sixteen
    [theme_uri] => https://wordpress.org/themes/twentysixteen/
    [description] => Twenty Sixteen is a modernized take on an ever-popular WordPress layout — the horizontal masthead with an optional right sidebar that works perfectly for blogs and websites. It has custom color options with beautiful default color schemes, a harmonious fluid grid using a mobile-first approach, and impeccable polish in every detail. Twenty Sixteen will make your WordPress look beautiful everywhere.
    [author] => the WordPress team
    [author_uri] => https://wordpress.org/
    [version] => 1.3
    [template] =>
    [status] =>
    [tags] => Array
        (
            [0] => one-column
            [1] => two-columns
            [2] => right-sidebar
            [3] => accessibility-ready
            [4] => custom-background
            [5] => custom-colors
            [6] => custom-header
            [7] => custom-menu
            [8] => editor-style
            [9] => featured-images
            [10] => flexible-header
            [11] => microformats
            [12] => post-formats
            [13] => rtl-language-support
            [14] => sticky-post
            [15] => threaded-comments
            [16] => translation-ready
            [17] => blog
        )

    [text_domain] => twentysixteen
    [domain_path] =>
    [slug] => twentysixteen
)

```

Requirements
------------

[](#requirements)

PHP &gt;= 8.0.

Credits
-------

[](#credits)

This was forked from [tutv/wp-package-parser](https://github.com/tutv/wp-package-parser). The original project was not updated for many years. I forked it, and modernized it for compatibility with:

- PHP8+
- PHPUnit v9.6
- Improved coding standards
- Composer autoloading
- GitHub Actions for automated CI testing

All original licensing remains the same. Many thanks to @tutv for his contributions.

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance61

Regular maintenance activity

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76.4% 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 ~2 days

Total

4

Last Release

277d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/384a78d820915cc37a133e89aa6a4b372047adccddee6b6ec74d227ad957593f?d=identicon)[AndrewJDawes](/maintainers/AndrewJDawes)

---

Top Contributors

[![tutv](https://avatars.githubusercontent.com/u/7255177?v=4)](https://github.com/tutv "tutv (81 commits)")[![renventura](https://avatars.githubusercontent.com/u/7537202?v=4)](https://github.com/renventura "renventura (13 commits)")[![AndrewJDawes](https://avatars.githubusercontent.com/u/53574062?v=4)](https://github.com/AndrewJDawes "AndrewJDawes (12 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/andrewjdawes-wp-package-parser/health.svg)

```
[![Health](https://phpackages.com/badges/andrewjdawes-wp-package-parser/health.svg)](https://phpackages.com/packages/andrewjdawes-wp-package-parser)
```

###  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)[wp-hooks/generator

Generates a JSON representation of the WordPress actions and filters in your code

86178.4k3](/packages/wp-hooks-generator)[stepanenko3/nova-cards

A Laravel Nova info cards.

33143.0k](/packages/stepanenko3-nova-cards)[mobizel/markdown-docs-bundle

Explore your markdown documentation files via html web pages

108.6k](/packages/mobizel-markdown-docs-bundle)[benmanu/silverstripe-styleguide

Generates a styleguide for a SilverStripe theme

108.1k1](/packages/benmanu-silverstripe-styleguide)

PHPackages © 2026

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