PHPackages                             enriquesomolinos/phpweb-cpd - 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. enriquesomolinos/phpweb-cpd

ActiveLibrary

enriquesomolinos/phpweb-cpd
===========================

Copy/Paste Detector for PHP web projects.

v2.0.1(4y ago)114.0k2BSD-3-ClausePHPPHP ^7.2

Since Jul 1Pushed 4y agoCompare

[ Source](https://github.com/enriquesomolinos/phpweb-cpd)[ Packagist](https://packagist.org/packages/enriquesomolinos/phpweb-cpd)[ Docs](https://github.com/enriquesomolinos/phpweb-cpd)[ Fund](https://paypal.me/esomolinos?locale.x=es_ES)[ RSS](/packages/enriquesomolinos-phpweb-cpd/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (9)Dependencies (7)Versions (11)Used By (0)

PHPWEB Copy/Paste Detector (PHPWEBCPD)
======================================

[](#phpweb-copypaste-detector-phpwebcpd)

`phpwebcpd` is a Copy/Paste Detector (CPD) for PHPWEB code. This project check the following type of files for duplicates:

- PHP
- JS
- TWIG
- CSS
- SCSS

This project is based on Sebastian Bergmann PHPCPD project ()

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

[](#installation)

Download via Composer composer require enriquesomolinos/phpweb-cpd

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

[](#usage-example)

```
$ php phpwebcpd --fuzzy tests
phpwebcpd 1.0.0

Found 1 clones with 59 duplicated lines in 1 files *.php:

  - C:\phpweb-cpd\tests\fixture\Math.php:75-134 (59 lines)
    C:\phpweb-cpd\tests\fixture\Math.php:139-198

8.45% duplicated lines out of 698 total lines of code *.php.
Average size of duplication is 59 lines, largest clone has 59 of lines

Found 1 clones with 20 duplicated lines in 2 files *.twig:

  - C:\phpweb-cpd\tests\twig\contact.twig:1-21 (20 lines)
    C:\phpweb-cpd\tests\twig\contact2.twig:1-21

52.63% duplicated lines out of 38 total lines of code *.twig.
Average size of duplication is 20 lines, largest clone has 20 of lines

Found 1 clones with 15 duplicated lines in 2 files *.js:

  - C:\phpweb-cpd\tests\js\Plane.js:1-16 (15 lines)
    C:\phpweb-cpd\tests\js\Vehicle.js:1-16

53.57% duplicated lines out of 28 total lines of code *.js.
Average size of duplication is 15 lines, largest clone has 15 of lines

Found 1 clones with 18 duplicated lines in 2 files *.css:

  - C:\phpweb-cpd\tests\css\sample.css:5-23 (18 lines)
    C:\phpweb-cpd\tests\css\sample2.css:5-23

45.00% duplicated lines out of 40 total lines of code *.css.
Average size of duplication is 18 lines, largest clone has 18 of lines

Found 1 clones with 146 duplicated lines in 2 files *.scss:

  - C:\phpweb-cpd\tests\scss\button.scss:14-160 (146 lines)
    C:\phpweb-cpd\tests\scss\button2.scss:14-160

43.71% duplicated lines out of 334 total lines of code *.scss.
Average size of duplication is 146 lines, largest clone has 146 of lines

Time: 00:00.882, Memory: 6.00 MB

```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.5% 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 ~53 days

Recently: every ~4 days

Total

10

Last Release

1664d ago

Major Versions

v1.2.1 → v2.0.02021-10-20

PHP version history (2 changes)v1.0.0PHP ^7.3

v1.1.2PHP ^7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/94c9d9e82582035efe6fa62ed61c607de282fce97354ecc2ecb3e885eaeaea4f?d=identicon)[esomolinos](/maintainers/esomolinos)

---

Top Contributors

[![sebastianbergmann](https://avatars.githubusercontent.com/u/25218?v=4)](https://github.com/sebastianbergmann "sebastianbergmann (304 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)")[![Ocramius](https://avatars.githubusercontent.com/u/154256?v=4)](https://github.com/Ocramius "Ocramius (6 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (6 commits)")[![enriquesomolinos](https://avatars.githubusercontent.com/u/6418156?v=4)](https://github.com/enriquesomolinos "enriquesomolinos (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)")[![senechaux](https://avatars.githubusercontent.com/u/1520419?v=4)](https://github.com/senechaux "senechaux (3 commits)")[![kukulich](https://avatars.githubusercontent.com/u/260445?v=4)](https://github.com/kukulich "kukulich (2 commits)")[![mrenrcert](https://avatars.githubusercontent.com/u/65898230?v=4)](https://github.com/mrenrcert "mrenrcert (2 commits)")[![remicollet](https://avatars.githubusercontent.com/u/270445?v=4)](https://github.com/remicollet "remicollet (2 commits)")[![SergeyZ](https://avatars.githubusercontent.com/u/92912310?v=4)](https://github.com/SergeyZ "SergeyZ (2 commits)")[![svemir](https://avatars.githubusercontent.com/u/154453?v=4)](https://github.com/svemir "svemir (2 commits)")[![globin](https://avatars.githubusercontent.com/u/1447245?v=4)](https://github.com/globin "globin (2 commits)")[![burus86](https://avatars.githubusercontent.com/u/3636246?v=4)](https://github.com/burus86 "burus86 (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)")

### Embed Badge

![Health badge](/badges/enriquesomolinos-phpweb-cpd/health.svg)

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

###  Alternatives

[brianium/paratest

Parallel testing for PHP

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

A static analyzer for PHP

5.6k11.2M1.1k](/packages/phan-phan)[moodlehq/moodle-plugin-ci

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

612.6M](/packages/moodlehq-moodle-plugin-ci)[phel-lang/phel-lang

Phel is a functional programming language that compiles to PHP

4743.5k10](/packages/phel-lang-phel-lang)[php-soap/wsdl

Deals with WSDLs

173.5M12](/packages/php-soap-wsdl)[php-soap/wsdl-reader

A WSDL reader in PHP

212.3M9](/packages/php-soap-wsdl-reader)

PHPackages © 2026

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