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

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

capevace/wp-package-parser
==========================

A PHP library for parsing WordPress plugin and theme metadata.

1.0.0(7y ago)23262MITPHP

Since May 18Pushed 7y ago1 watchersCompare

[ Source](https://github.com/Capevace/wp-package-parser)[ Packagist](https://packagist.org/packages/capevace/wp-package-parser)[ RSS](/packages/capevace-wp-package-parser/feed)WikiDiscussions master Synced 2mo ago

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

WordPress Package Parser
========================

[](#wordpress-package-parser)

Attention
---------

[](#attention)

This library is YahnisElsts's [wp-extension-meta](https://github.com/YahnisElsts/wp-extension-meta) simply put into a composer package to be used in mordern PHP development. All I've added are some tests and modified some parts, so they'll work as a composer package.

All other credits to [YahnisElsts](https://github.com/YahnisElsts)!

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

[](#description)

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 (optional).

Usage
=====

[](#usage)

To install simply

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

```

Now you're able to use the parser!

```
use WPPackageParser\Parser;

$filepath = __DIR__ . '/resources/test-plugin.zip';
$result = Parser::parse($filepath);
```

Sample Output
-------------

[](#sample-output)

```
Array
(
    [header] => Array
        (
            [Name] => Plugin Name
            [PluginURI] => http://example.com/
            [Version] => 1.7
            [Description] => This plugin does stuff.
            [Author] => Yahnis Elsts
            [AuthorURI] => http://w-shadow.com/
            [TextDomain] => sample-plugin
            [DomainPath] =>
            [Network] =>
            [Title] => Plugin Name
        )

    [readme] => Array
        (
            [name] => Plugin Name
            [contributors] => Array
                (
                    [0] => whiteshadow
                )

            [tags] => Array
                (
                    [0] => sample
                    [1] => tag
                    [2] => stuff
                )

            [requires] => 3.2
            [tested] => 3.5.1
            [stable] => 1.7
            [short_description] => This is the short description from the readme.
            [sections] => Array
                (
                    [Description] => This is the Description section of the readme.
                    [Installation] => ...
                    [Changelog] => ...
                )
        )
    [pluginFile] => sample-plugin/sample-plugin.php
    [stylesheet] =>
    [type] => plugin
)

```

Credits
-------

[](#credits)

Base code from [YahnisElsts](https://github.com/YahnisElsts). Partially based on plugin header parsing code from the WordPress core.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity63

Established project with proven stability

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

Unknown

Total

1

Last Release

2918d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e572442281b0c1b6e8e8f966cc908161a66c4c822e950ff278f8f90dc4f2d2cd?d=identicon)[mateffy](/maintainers/mateffy)

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[sculpin/sculpin

Static Site Generator

1.5k102.8k12](/packages/sculpin-sculpin)[koriym/app-state-diagram

An Application Diagram Generator

38222.0k2](/packages/koriym-app-state-diagram)[foolz/foolfuuka

The FoolFuuka Imageboard

2191.8k](/packages/foolz-foolfuuka)[woutersioen/sir-trevor-php

A Sir Trevor to HTML conversion helper for PHP

2834.6k](/packages/woutersioen-sir-trevor-php)[magirc/magirc

MagIRC - Let the magirc begin!

381.1k](/packages/magirc-magirc)

PHPackages © 2026

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