PHPackages                             divineomega/php-bucket-testing - 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. divineomega/php-bucket-testing

Abandoned → [jord-jd/php-bucket-testing](/?search=jord-jd%2Fphp-bucket-testing)Library[Testing &amp; Quality](/categories/testing)

divineomega/php-bucket-testing
==============================

This library enables developers to easily redirect users to different URLs, for the purpose of bucket testing. Bucket testing is also known as A/B testing or split testing. This type of testing is used to test two or more versions of a webpage to determine which one performs better based on specfied key metrics, such as clicks, downloads, purchases or any other form of conversion.

v3.0.0(2mo ago)028LGPL-3.0-onlyPHPPHP &gt;=5.3

Since Mar 21Pushed 2mo agoCompare

[ Source](https://github.com/Jord-JD/php-bucket-testing)[ Packagist](https://packagist.org/packages/divineomega/php-bucket-testing)[ GitHub Sponsors](https://github.com/DivineOmega)[ RSS](/packages/divineomega-php-bucket-testing/feed)WikiDiscussions master Synced today

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

PHP Bucket Testing
==================

[](#php-bucket-testing)

[![Build Status](https://camo.githubusercontent.com/53c98dd39e4a9668fc7dff13e0ef87143abe122dc12d6cf8cf5bada0b1d2f5c5/68747470733a2f2f7472617669732d63692e6f72672f4a6f72642d4a442f7068702d6275636b65742d74657374696e672e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Jord-JD/php-bucket-testing)[![Coverage Status](https://camo.githubusercontent.com/3a2173e2b54141d49b985dfc58273127ca6c69f62c074095ec69e4d0079fc203/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f4a6f72642d4a442f7068702d6275636b65742d74657374696e672f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/Jord-JD/php-bucket-testing?branch=master)

This library enables developers to easily redirect users to different URLs, for the purpose of bucket testing. Bucket testing is also known as A/B testing or split testing.

This type of testing is used to test two or more versions of a webpage to determine which one performs better based on specfied key metrics, such as clicks, downloads, purchases or any other form of conversion.

Features
--------

[](#features)

- Random selection of buckets, with optional weights
- Automatic handling of temporary redirects
- Ability to retrieve bucket and manually handle URL redirection
- Easy to use fluent interface syntax

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

[](#installation)

To install, just run the following composer command.

`composer require jord-jd/php-bucket-testing`

Remember to include the `vendor/autoload.php` file if your framework does not already do so.

Usage
-----

[](#usage)

```
use \JordJD\BucketTesting\BucketManager;
use \JordJD\BucketTesting\Bucket;

// Create a new bucket manager
$bucketManager = new BucketManager;

// Add buckets, with URLs and optional weights
$bucketManager->add(new Bucket('https://google.co.uk/'))->withWeight(25);
$bucketManager->add(new Bucket('https://php.net/'))->withWeight(75);

// Redirect to a randomly selected URL
$bucketManager->redirect();

// Or, if you wish, get a random bucket and manually handle the redirection
$bucket = $bucketManager->getRandomBucket();
header('location: '.$bucket->url);
```

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance83

Actively maintained with recent releases

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 75% 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 ~650 days

Recently: every ~813 days

Total

6

Last Release

84d ago

Major Versions

v1.0.3 → v2.0.02018-09-06

v2.0.0 → v3.0.02026-02-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/c580cdf7c14898fff179cdfc1085892091d5d2f49d917873a12365af9ac77c93?d=identicon)[Jord-JD](/maintainers/Jord-JD)

---

Top Contributors

[![Jord-JD](https://avatars.githubusercontent.com/u/650645?v=4)](https://github.com/Jord-JD "Jord-JD (9 commits)")[![kirsty-gasston](https://avatars.githubusercontent.com/u/12949343?v=4)](https://github.com/kirsty-gasston "kirsty-gasston (3 commits)")

---

Tags

a-b-testingbucket-testingfrontend-testingsplit-testingtestingui-testingux-testingtestingsplit testinga b testingbucket testingUX testingUI testingfrontend testing

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/divineomega-php-bucket-testing/health.svg)

```
[![Health](https://phpackages.com/badges/divineomega-php-bucket-testing/health.svg)](https://phpackages.com/packages/divineomega-php-bucket-testing)
```

###  Alternatives

[phpunit/phpunit

The PHP Unit Testing framework.

20.0k910.7M134.6k](/packages/phpunit-phpunit)[phpunit/php-code-coverage

Library that provides collection, processing, and rendering functionality for PHP code coverage information.

8.9k892.4M1.5k](/packages/phpunit-php-code-coverage)[mockery/mockery

Mockery is a simple yet flexible PHP mock object framework

10.7k497.0M23.5k](/packages/mockery-mockery)[behat/behat

Scenario-oriented BDD framework for PHP

4.0k96.8M2.0k](/packages/behat-behat)[symfony/phpunit-bridge

Provides utilities for PHPUnit, especially user deprecation notices management

2.5k201.2M4.2k](/packages/symfony-phpunit-bridge)[brianium/paratest

Parallel testing for PHP

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

PHPackages © 2026

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