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 2w ago

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 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

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

Total

3

Last Release

2899d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5074981?v=4)[Lore Sjöberg](/maintainers/loresjoberg)[@loresjoberg](https://github.com/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

[dms/phpunit-arraysubset-asserts

This package provides ArraySubset and related asserts once deprecated in PHPUnit 8

14228.7M341](/packages/dms-phpunit-arraysubset-asserts)[phpbenchmark/phpbenchmark

Easy to use benchmark toolkit for your PHP-application. This library contains classes for comparing algorithms as well as benchmarking application responses

8011.5k2](/packages/phpbenchmark-phpbenchmark)

PHPackages © 2026

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