PHPackages                             loresjoberg/warp - 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. loresjoberg/warp

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

loresjoberg/warp
================

A passthrough to WordPress, used to enable unit testing.

v1.0.1(7y ago)116MITPHPPHP &gt;=5.4

Since Jul 23Pushed 7y ago1 watchersCompare

[ Source](https://github.com/LoreSjoberg/warp)[ Packagist](https://packagist.org/packages/loresjoberg/warp)[ RSS](/packages/loresjoberg-warp/feed)WikiDiscussions master Synced today

READMEChangelog (2)DependenciesVersions (4)Used By (0)

Warp
====

[](#warp)

Here's why this class exists: WordPress pollutes the global namespace something awful, and there's nothing we can do about that.

However, we can voluntarily "wrap" WordPress in a class, and choose to only access it through that class. Why would we want to do that? The main reason is unit testing. By accessing WordPress's global functions only through this class, we can easily mock it up and test without instantiating all of WordPress, setting up a database, so on and so forth.

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

[](#installation)

Install using \[Composer\]\[composer\]:

```
    composer require loresjoberg/warp

```

Usage
-----

[](#usage)

$warp = new \\LoreSjoberg\\Warp();

$result = $warp-&gt;count\_users();

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

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

Total

3

Last Release

2850d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6a53c60c704aabdb747ed5b509bc9ee43e0e4dcf238746ba9c8501bb186c1173?d=identicon)[loresjoberg](/maintainers/loresjoberg)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/loresjoberg-warp/health.svg)

```
[![Health](https://phpackages.com/badges/loresjoberg-warp/health.svg)](https://phpackages.com/packages/loresjoberg-warp)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)

PHPackages © 2026

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