PHPackages                             tutv95/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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. tutv95/wp-package-parser

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

tutv95/wp-package-parser
========================

1.0.4(9y ago)9286.0k↓13.7%2MITPHPPHP &gt;=5.4

Since Jun 16Pushed 2y ago1 watchersCompare

[ Source](https://github.com/tutv95/wp-package-parser)[ Packagist](https://packagist.org/packages/tutv95/wp-package-parser)[ RSS](/packages/tutv95-wp-package-parser/feed)WikiDiscussions develop Synced today

READMEChangelog (2)Dependencies (1)Versions (13)Used By (0)

WP Package Parser [![Travis](https://camo.githubusercontent.com/c9a8f4e2fa7c63b4d01e7e122a663cb58999d4aa3033773aced12c3beb17e9da/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f747574762f77702d7061636b6167652d7061727365722e737667)](https://travis-ci.org/tutv/wp-package-parser) [![GitHub issues](https://camo.githubusercontent.com/e2c8305d78bfc34f73a7658582247287a93d2b5dceb94ee8b156fa268d3b831b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f747574762f77702d7061636b6167652d7061727365722e737667)](https://github.com/tutv/wp-package-parser/issues) [![GitHub license](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://raw.githubusercontent.com/tutv/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)

Include `wp-package-parser.php` or [install the composer package](https://packagist.org/packages/tutv95/wp-package-parser).

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

[](#basic-usage)

### Extract plugin metadata:

[](#extract-plugin-metadata)

```
require 'wp-package-parser/wp-package-parser.php';
$package = new Max_WP_Package('/var/path/plugin.zip');
print_r($package->get_metadata());
```

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 'wp-package-parser/wp-package-parser.php';
$package = new Max_WP_Package('/var/path/theme.zip');
print_r($package->get_metadata());
```

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 5.4.

Credits
-------

[](#credits)

Partially based on plugin header parsing code from the WordPress core.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community9

Small or concentrated contributor base

Maturity65

Established project with proven stability

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

Total

5

Last Release

3301d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7d4b8c48c19cad170efd47b1dd19824182b86ce435fc2938329bb09011398c91?d=identicon)[tutv95](/maintainers/tutv95)

---

Top Contributors

[![tutv](https://avatars.githubusercontent.com/u/7255177?v=4)](https://github.com/tutv "tutv (81 commits)")

---

Tags

metadataparseparsing-wordpress-pluginphppluginsthemetheme-metadatathemeswordpress

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[mck89/peast

Peast is PHP library that generates AST for JavaScript code

19139.2M47](/packages/mck89-peast)[sauladam/shipment-tracker

Parses tracking information for several carriers, like UPS, USPS, DHL and GLS by simply scraping the data. No need for any kind of API access.

9843.5k](/packages/sauladam-shipment-tracker)[jstewmc/rtf

Read and write Rich Text Format (RTF) documents with PHP

45153.1k6](/packages/jstewmc-rtf)[tcds-io/php-jackson

A lightweight, flexible object serializer for PHP, inspired by FasterXML/jackson

113.2k10](/packages/tcds-io-php-jackson)

PHPackages © 2026

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