PHPackages                             lumecent/phpcpd - 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. lumecent/phpcpd

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

lumecent/phpcpd
===============

Copy/Paste Detector (CPD) for PHP code.

1.2.0(2y ago)0154BSD-3-ClausePHPPHP &gt;=8.1

Since May 6Pushed 2y agoCompare

[ Source](https://github.com/Lumecent/phpcpd)[ Packagist](https://packagist.org/packages/lumecent/phpcpd)[ Docs](https://github.com/sebastianbergmann/phpcpd)[ GitHub Sponsors](https://github.com/sebastianbergmann)[ RSS](/packages/lumecent-phpcpd/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (4)Used By (0)

**This project is no longer maintained and its repository is only kept for archival purposes.**

PHP Copy/Paste Detector (PHPCPD)
================================

[](#php-copypaste-detector-phpcpd)

`phpcpd` is a Copy/Paste Detector (CPD) for PHP code.

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

[](#installation)

This tool is distributed as a [PHP Archive (PHAR)](https://php.net/phar):

```
$ wget https://phar.phpunit.de/phpcpd.phar

$ php phpcpd.phar --version
```

Using [Phive](https://phar.io/) is the recommended way for managing the tool dependencies of your project:

```
$ phive install phpcpd

$ ./tools/phpcpd --version
```

**[It is not recommended to use Composer to download and install this tool.](https://twitter.com/s_bergmann/status/999635212723212288)**

Usage Example
-------------

[](#usage-example)

```
$ php phpcpd.phar --fuzzy wordpress-5.5
phpcpd 6.0.0 by Sebastian Bergmann.

Found 121 clones with 8137 duplicated lines in 69 files:

  - /home/sb/wordpress-5.5/wp-includes/sodium_compat/src/Core/Curve25519/H.php:19-1466 (1447 lines)
    /home/sb/wordpress-5.5/wp-includes/sodium_compat/src/Core32/Curve25519/H.php:19-1466
.
.
.
  - /home/sb/wordpress-5.5/wp-includes/sodium_compat/src/Core32/Curve25519.php:879-889 (10 lines)
    /home/sb/wordpress-5.5/wp-includes/sodium_compat/src/Core32/Curve25519.php:1072-1082

1.82% duplicated lines out of 446676 total lines of code.
Average size of duplication is 67 lines, largest clone has 1447 of lines

Time: 00:02.980, Memory: 318.00 MB

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.6% 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 ~1 days

Total

3

Last Release

741d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0aea97f8df0c2a39ee7a760b139764eba24a5211a4537c989b4969694af29766?d=identicon)[Lumecent](/maintainers/Lumecent)

---

Top Contributors

[![sebastianbergmann](https://avatars.githubusercontent.com/u/25218?v=4)](https://github.com/sebastianbergmann "sebastianbergmann (416 commits)")[![olleharstedt](https://avatars.githubusercontent.com/u/607341?v=4)](https://github.com/olleharstedt "olleharstedt (29 commits)")[![aboks](https://avatars.githubusercontent.com/u/815524?v=4)](https://github.com/aboks "aboks (9 commits)")[![alexshadow007](https://avatars.githubusercontent.com/u/647552?v=4)](https://github.com/alexshadow007 "alexshadow007 (7 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (6 commits)")[![Ocramius](https://avatars.githubusercontent.com/u/154256?v=4)](https://github.com/Ocramius "Ocramius (6 commits)")[![Lumecent](https://avatars.githubusercontent.com/u/68386445?v=4)](https://github.com/Lumecent "Lumecent (5 commits)")[![edorian](https://avatars.githubusercontent.com/u/247397?v=4)](https://github.com/edorian "edorian (4 commits)")[![JeroenDeDauw](https://avatars.githubusercontent.com/u/146040?v=4)](https://github.com/JeroenDeDauw "JeroenDeDauw (3 commits)")[![globin](https://avatars.githubusercontent.com/u/1447245?v=4)](https://github.com/globin "globin (2 commits)")[![SergeyZ](https://avatars.githubusercontent.com/u/92912310?v=4)](https://github.com/SergeyZ "SergeyZ (2 commits)")[![remicollet](https://avatars.githubusercontent.com/u/270445?v=4)](https://github.com/remicollet "remicollet (2 commits)")[![mrenrcert](https://avatars.githubusercontent.com/u/65898230?v=4)](https://github.com/mrenrcert "mrenrcert (2 commits)")[![kukulich](https://avatars.githubusercontent.com/u/260445?v=4)](https://github.com/kukulich "kukulich (2 commits)")[![svemir](https://avatars.githubusercontent.com/u/154453?v=4)](https://github.com/svemir "svemir (2 commits)")[![tommygnr](https://avatars.githubusercontent.com/u/929392?v=4)](https://github.com/tommygnr "tommygnr (1 commits)")[![ajardin](https://avatars.githubusercontent.com/u/3305232?v=4)](https://github.com/ajardin "ajardin (1 commits)")[![g-g](https://avatars.githubusercontent.com/u/765134?v=4)](https://github.com/g-g "g-g (1 commits)")[![gooh](https://avatars.githubusercontent.com/u/370948?v=4)](https://github.com/gooh "gooh (1 commits)")[![henriquemoody](https://avatars.githubusercontent.com/u/154023?v=4)](https://github.com/henriquemoody "henriquemoody (1 commits)")

### Embed Badge

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

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

###  Alternatives

[phpunit/phpunit

The PHP Unit Testing framework.

20.0k910.7M134.8k](/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)[brianium/paratest

Parallel testing for PHP

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

CLI frontend for php-code-coverage

23621.1M583](/packages/phpunit-phpcov)[moodlehq/moodle-plugin-ci

Helps running Moodle plugins analysis checks and tests under various CI environments.

612.6M](/packages/moodlehq-moodle-plugin-ci)[innmind/black-box

Test library

44178.7k93](/packages/innmind-black-box)

PHPackages © 2026

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