PHPackages                             voceconnect/wp-qa-suite - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. voceconnect/wp-qa-suite

ActiveLibrary[Testing &amp; Quality](/categories/testing)

voceconnect/wp-qa-suite
=======================

Install scripts and commands for basic quality checks and testing for WordPress projects

1.1.0(10y ago)24.1k[1 issues](https://github.com/voceconnect/wp-qa-suite/issues)1Shell

Since Oct 13Pushed 10y ago12 watchersCompare

[ Source](https://github.com/voceconnect/wp-qa-suite)[ Packagist](https://packagist.org/packages/voceconnect/wp-qa-suite)[ RSS](/packages/voceconnect-wp-qa-suite/feed)WikiDiscussions master Synced 1mo ago

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

wp-qa-suite
===========

[](#wp-qa-suite)

A set of scripts to facilitate the ease of adding syntax checking, unit testing, and code sniffs to a given WordPress project theme or plugin.

The `wp-qa-suite` provides a consistent way for projects to include continuous integration functionality with something like Travis CI without needing to write BASH statements. Since `wp-qa-suite` can be installed via Composer, this makes updating `wp-qa-suite` for multiple projects easy.

### Setup

[](#setup)

1. Add a `composer.json` file to install the `wp-qa-suite`, example:

```
{
  "name": "you/your-wordpress-plugin",
  "description": "A WordPress plugin to illustrate how to use wp-qa-suite...",
  "license": "GPLv2+",
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/voceconnect/wp-qa-suite.git"
    }
  ],
  "require-dev": {
    "voceconnect/wp-qa-suite": "~1.0"
  },
  "bin": [
    "bin/wp-qa-syntax",
    "bin/wp-qa-phpunit",
    "bin/wp-qa-codesniff"
  ]
}

```

2. Execute `composer install --dev`

### Scripts

[](#scripts)

#### bin/wp-qa-codesniff

[](#binwp-qa-codesniff)

Reads a `phpcs.ruleset.xml` from the root of the project and executes `phpcs` against only PHP files in the project using `git ls-tree`. [WordPress-Coding-Standards/WordPress-Coding-Standards](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards) are installed and added to the `installed_paths` configuration of `phpcs`.

#### bin/wp-qa-phpunit

[](#binwp-qa-phpunit)

Installs the latest or a specific version of WordPress, the [WordPress test suite](http://develop.svn.wordpress.org/trunk/tests/phpunit/includes/), sets up the database, and executes `phpunit --configuration phpunit.xml`. Settings are read from a `phpunit.xml` stored in the project root.

**Arguments**:

- `wp_version` - (required) the version of WordPress to test against, `3.9.2`, `3.8.4`, etc. or `latest`.
- `DB_USER` - (optional, default: travis) the username to use when connecting to MySQL
- `DB_PASS` - (optional, default: *none*) the password for the `DB_USER` to use when connecting to MySQL
- `DB_NAME` - (optional, default: wp\_test) the MySQL database name to use for tests
- `DB_HOST` - (optional, default: localhost) the host running the MySQL instance to connect to

#### bin/wp-qa-syntax

[](#binwp-qa-syntax)

Executes syntax checks against all PHP files in the project. Since `git ls-tree` is used, the script will only scan over files included in the project and not dependencies installed via Composer.

### Integrating with Travis CI

[](#integrating-with-travis-ci)

An example `.travis.yml` file:

```
---
language: php

php:
  - 5.5
  - 5.4

env:
  - WP_VERSION=latest

before_script:
  - composer install --dev

script:
  - vendor/bin/wp-qa-syntax
  - vendor/bin/wp-qa-phpunit $WP_VERSION

```

The `.travis.yml` file specifies how the application should be tested in Travis CI.

In the example within this repository, we want to test our plugin against PHP versions `5.4` and `5.5`:

```
php:
  - 5.5
  - 5.4

```

We can also tests against different versions of WordPress by specifying an environment variable, `WP_VERSION`. The `WP_VERSION` environment variable is passed to the `wp-qa-phpunit` script and used to retrieve the latest or specific version of WordPress.

```
env:
  - WP_VERSION=latest

```

The `before_script` section of the `.travis.yml` file should be used to 'setup' or 'prep' the test environment, in this case it is used to install Composer dependencies.

```
before_script:
  - composer install --dev

```

The `script` section of the `.travis.yml` file specifies what should be executed that constitutes "tests" or a "build". If these commands return an exit status that doesn't equal 0, this results in the build "failing".

```
script:
  - vendor/bin/wp-qa-syntax
  - vendor/bin/wp-qa-phpunit $WP_VERSION

```

In this example, we want to execute a check of all the PHP files for correct syntax, followed by execution of PHP unit tests.

###  Health Score

30

—

LowBetter than 65% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity64

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

Total

2

Last Release

3960d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/68431036eb11480c4075c2363add4d23e8e7b7b28f43396165c5c63cbcbee049?d=identicon)[prettyboymp](/maintainers/prettyboymp)

---

Top Contributors

[![seanosh](https://avatars.githubusercontent.com/u/103630?v=4)](https://github.com/seanosh "seanosh (9 commits)")

### Embed Badge

![Health badge](/badges/voceconnect-wp-qa-suite/health.svg)

```
[![Health](https://phpackages.com/badges/voceconnect-wp-qa-suite/health.svg)](https://phpackages.com/packages/voceconnect-wp-qa-suite)
```

###  Alternatives

[slevomat/coding-standard

Slevomat Coding Standard for PHP\_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.

1.5k123.5M1.8k](/packages/slevomat-coding-standard)[magento/magento-coding-standard

A set of Magento specific PHP CodeSniffer rules.

37113.4M299](/packages/magento-magento-coding-standard)[youwe/testing-suite

Contains Youwe's default testing packages for php.

13176.9k8](/packages/youwe-testing-suite)[me-io/appium-driver-codeception

appium driver for codeception framework

1910.4k](/packages/me-io-appium-driver-codeception)

PHPackages © 2026

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