PHPackages                             phpbcc/phpbcc - 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. phpbcc/phpbcc

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

phpbcc/phpbcc
=============

A tool that provides visibility on the authors of uncovered code.

1.0.0(9y ago)57.8k2BSD3-clausePHPPHP 7.\*

Since Nov 29Pushed 8y ago1 watchersCompare

[ Source](https://github.com/chrishalbert/phpbcc)[ Packagist](https://packagist.org/packages/phpbcc/phpbcc)[ RSS](/packages/phpbcc-phpbcc/feed)WikiDiscussions master Synced 2mo ago

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

Php Blame Code Coverage (PhpBCC)
================================

[](#php-blame-code-coverage-phpbcc)

[![Build Status](https://camo.githubusercontent.com/e9f9c3e3d8024d0cfddf5c6f3773306e6f5b9f42f317a1b4b943a8dab36835cf/68747470733a2f2f7472617669732d63692e6f72672f636872697368616c626572742f7068706263632e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/chrishalbert/phpbcc)[![Coverage Status](https://camo.githubusercontent.com/f85c560babd860922681bc56e6b4e3434f6725e06128fed4dcce961cddbbd6ba/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f636872697368616c626572742f7068706263632f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/chrishalbert/phpbcc?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/6bf14f0d9b0fc41a1834f590cf512411d42931055f7172006a5ce2167ed621c4/68747470733a2f2f706f7365722e707567782e6f72672f7068706263632f7068706263632f76657273696f6e)](https://packagist.org/packages/phpbcc/phpbcc)[![License](https://camo.githubusercontent.com/86bc97d2ad6e1d1e20374e6a9ccc744342a31b974e7c7210522a990f22496c79/68747470733a2f2f706f7365722e707567782e6f72672f7068706263632f7068706263632f6c6963656e7365)](https://packagist.org/packages/phpbcc/phpbcc)

A tool that consumes a code coverage report and uses the version control history to report metrics on uncovered code by author.

What is this and how can I benefit?
-----------------------------------

[](#what-is-this-and-how-can-i-benefit)

- **Testing Advocate** - Encourages developers to NOT introduce uncovered code
- **Coverage Bar Setter** - Implicitly increases the overall code coverage over development time once introduced since developers are encouraged to not introduce uncovered code.
- **Visibility** - Provides visibility to authors. Once run, the author is alerted if some of their code is not fully covered.
- **Accountability** - Assigns uncovered code to authors to fix. Tasks/user stories/tickets are always assigned to someone to someone in part for visibility and also to make sure it gets done. This is the point of contact.
- **Boy Scout Rule** - Authors are encouraged and have full sight of code that can be cleaned up. Leave the code cleaner than you found it.

What this is *NOT*?
-------------------

[](#what-this-is-not)

- **Performance Metric Indicator** - This assigns developers to be accountable for their's and others' code but cannot be used to show their performance. Typically, performance metrics assess both positive and negative attributes; this only reports on code that needs to be covered. Use the codebase's code coverage improvement to report on the team's quality rather than the individual.
- **100% Accurate**
    1. Edited or removed test cases may show an author that introduced uncovered lines or methods, which is not necessarily true.
    2. Merge conflict resolutions
    3. Git history is editable
    4. There's likely more..
- **Blame Bus** - Keep that blameless mentality, just assign tasks so they get done at some point and help your team want to grow.

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

[](#installation--)

Global installation:

```
composer global require phpbcc/phpbcc
```

Local/project installation:

```
composer require-dev phpbcc/phpbcc

```

or manually add it to the require-dev section of your composer file.

```
{
    "require-dev"   : {
        "phpbcc/phpbcc": "*"
    }
}
```

Usage
-----

[](#usage)

```
> phpbcc --output-format=author reports/clover.xml

```

Sample Output
-------------

[](#sample-output)

```
phpbcc version 1.0.0 by Chris Halbert

PHP BLAME CODE COVERAGE                                                UNCOVERED OBJECTS (#/total) %

Chris Halbert                                                                             (8/8) 100%
  FileNotFoundException.php:15, 16, 17, 18                                                 (4/8) 50%
  AbstractInput.php:39, 76, 78                                                           (3/8) 37.5%
  AuthorOutput.php:157                                                                   (1/8) 12.5%

```

Rollout
-------

[](#rollout)

1. Ask your manager/lead if it can be tested.
2. Check your code coverage.
3. Add it to your build process.
4. Check code coverage after your 'testing period.'
5. If it works, keep, if not, trash. Regardless, let me know what you think.

Feature Requests/Bugs
---------------------

[](#feature-requestsbugs)

Submit feature requests or bugs at [PhpBCC Issues](https://github.com/chrishalbert/phpbcc/issues).

Some ideas on new features: SVN/CVS/Mercurial support, a report other than Clover, different output type.

Contributing
------------

[](#contributing)

1. Build off of the interfaces established
2. Ensure code coverage!
3. Make sure the build passes
4. Submit to [PhpBCC Pull Requests](https://github.com/chrishalbert/phpbcc/pulls)

Feedback
--------

[](#feedback)

Let me know the successes or hardships you may experience.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community9

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

Total

2

Last Release

3374d ago

Major Versions

0.1.0 → 1.0.02017-02-17

PHP version history (2 changes)0.1.0PHP 5.6.\*

1.0.0PHP 7.\*

### Community

Maintainers

![](https://www.gravatar.com/avatar/2a36d01e69089e5e2e2eceb931f79daf20d7a565a0903541edf949479c9ae471?d=identicon)[chrishalbert](/maintainers/chrishalbert)

---

Top Contributors

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

---

Tags

code-coveragecode-qualitycoveragegit-blamephpcoveragecodequalitygitblame

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[vimeo/psalm

A static analysis tool for finding errors in PHP applications

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

A static analyzer for PHP

5.6k11.2M1.1k](/packages/phan-phan)[nunomaduro/phpinsights

Instant PHP quality checks from your console.

5.6k10.8M426](/packages/nunomaduro-phpinsights)[dvdoug/behat-code-coverage

Generate Code Coverage reports for Behat tests

593.6M37](/packages/dvdoug-behat-code-coverage)[hot/phpunit-runner

The lib allows to watch phpunit tests

3066.9k4](/packages/hot-phpunit-runner)[robiningelbrecht/phpunit-coverage-tools

PHPUnit coverage tools

1783.0k34](/packages/robiningelbrecht-phpunit-coverage-tools)

PHPackages © 2026

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