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

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

rapidwebltd/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.

v1.0.3(8y ago)229LGPL-3.0-onlyPHPPHP &gt;=5.3

Since Mar 21Pushed 8y ago3 watchersCompare

[ Source](https://github.com/rapidwebltd/php-bucket-testing)[ Packagist](https://packagist.org/packages/rapidwebltd/php-bucket-testing)[ RSS](/packages/rapidwebltd-php-bucket-testing/feed)WikiDiscussions master Synced yesterday

READMEChangelog (4)Dependencies (2)Versions (5)Used By (0)

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

[](#php-bucket-testing)

[![Build Status](https://camo.githubusercontent.com/85b9578d1c6e1110c9838d9b830b209d6f56046700070fc2035cb4b15e9d4a78/68747470733a2f2f7472617669732d63692e6f72672f72617069647765626c74642f7068702d6275636b65742d74657374696e672e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/rapidwebltd/php-bucket-testing)[![Coverage Status](https://camo.githubusercontent.com/3d08b9de13ccbdda318f7d0e11f5092804605c8c98aea7a1cba3f51c627069a1/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f72617069647765626c74642f7068702d6275636b65742d74657374696e672f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/rapidwebltd/php-bucket-testing?branch=master)[![StyleCI](https://camo.githubusercontent.com/9b4e386204aaad0c6f1088fd798de20f8564548f4615064da7e1aa118e414fcd/68747470733a2f2f7374796c6563692e696f2f7265706f732f38353638383431362f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/85688416)

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 rapidwebltd/php-bucket-testing`

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

Usage
-----

[](#usage)

```
use \RapidWeb\BucketTesting\BucketManager;
use \RapidWeb\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

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 57.1% 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 ~121 days

Total

4

Last Release

3023d ago

### 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 (4 commits)")[![kirsty-gasston](https://avatars.githubusercontent.com/u/12949343?v=4)](https://github.com/kirsty-gasston "kirsty-gasston (3 commits)")

---

Tags

ab-testingbucket-testingphpphp-librarysplit-testingtestingtestingsplit testinga b testingbucket testingUX testingUI testingfrontend testing

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[phpunit/phpunit

The PHP Unit Testing framework.

20.0k940.0M150.3k](/packages/phpunit-phpunit)[phpunit/php-code-coverage

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

8.9k921.0M1.6k](/packages/phpunit-php-code-coverage)[mockery/mockery

Mockery is a simple yet flexible PHP mock object framework

10.7k516.1M26.2k](/packages/mockery-mockery)[behat/behat

Scenario-oriented BDD framework for PHP

4.0k100.2M2.1k](/packages/behat-behat)[symfony/phpunit-bridge

Provides utilities for PHPUnit, especially user deprecation notices management

2.5k208.3M4.9k](/packages/symfony-phpunit-bridge)[brianium/paratest

Parallel testing for PHP

2.5k129.9M913](/packages/brianium-paratest)

PHPackages © 2026

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