68% composer

Code Review | WP Composer

WordPress plugin WP Composer scored68%from 54 tests.

About plugin

  • Plugin page: composer
  • Plugin version: 0.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Jun 10, 2013
  • Latest release: Jul 15, 2013
  • Number of updates: 16
  • Update frequency: every 2.2 days
  • Top authors: sean212 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /7,318 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.32ms] Passed 4 tests

An overview of server-side resources used by WP Composer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.99 ▲4.16
Dashboard /wp-admin3.31 ▲0.0049.20 ▼3.47
Posts /wp-admin/edit.php3.36 ▲0.0052.45 ▼4.20
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.93 ▼22.98
Media Library /wp-admin/upload.php3.23 ▲0.0035.29 ▼2.62

Server storage [IO: ▲4.56MB] [DB: ▲0.00MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 802 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by WP Composer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.73 ▲0.371.78 ▲0.1644.71 ▼1.29
Dashboard /wp-admin2,195 ▲155.64 ▼0.0387.08 ▼10.7337.15 ▼17.23
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0643.11 ▲4.8236.71 ▼2.04
Add New Post /wp-admin/post-new.php1,526 ▼023.36 ▲0.69688.17 ▼19.7653.62 ▼13.85
Media Library /wp-admin/upload.php1,403 ▲34.23 ▼0.03100.61 ▼16.3847.31 ▼1.49

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/composer/vendor/composer/composer/tests/Composer/Test/Autoload/Fixtures/template/template_3.php
    • > /wp-content/plugins/composer/vendor/composer/composer/tests/Composer/Test/Autoload/Fixtures/template/template_2.php
  • 371× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/composer/vendor/composer/composer/tests/Composer/Test/Autoload/Fixtures/composer/autoload_real.php' (include_path='.:/usr/share/php') in wp-content/plugins/composer/vendor/composer/composer/tests/Composer/Test/Autoload/Fixtures/autoload_functions.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Command\\Command' not found in wp-content/plugins/composer/vendor/composer/composer/src/Composer/Command/UpdateCommand.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/composer/vendor/symfony/finder/Symfony/Component/Finder/Tests/Expression/RegexTest.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Finder\\Iterator\\FilterIterator' not found in wp-content/plugins/composer/vendor/symfony/finder/Symfony/Component/Finder/Iterator/FileTypeFilterIterator.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Composer\\Installer\\InstallerInterface' not found in wp-content/plugins/composer/vendor/composer/composer/tests/Composer/Test/Installer/Fixtures/installer-v4/Installer/Custom2.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Command\\Command' not found in wp-content/plugins/composer/vendor/composer/composer/src/Composer/Command/ConfigCommand.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/composer/vendor/symfony/console/Symfony/Component/Console/Tests/Helper/DialogHelperTest.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'JsonSchema\\Tests\\BaseTestCase' not found in wp-content/plugins/composer/vendor/justinrainbow/json-schema/tests/JsonSchema/Tests/RequiredPropertyTest.php:5
    • > PHP Parse error
      syntax error, unexpected end of file, expecting ';' or ',' in wp-content/plugins/composer/vendor/composer/composer/tests/Composer/Test/Autoload/Fixtures/template/template_1.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/composer/vendor/composer/composer/tests/Composer/Test/ConfigTest.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: dependency, assets, wp-cli, php, command line...

composer/composer.php Passed 13 tests

The main PHP file in "WP Composer" ver. 0.1.2 adds more information about the plugin and also serves as the entry point for this plugin
45 characters long description:
Adds Composer support to WordPress and WP-CLI

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
It is important to fix the following items
  • Do not include executable or dangerous files in your plugin
    • .exe - Executable in Windows
      • wp-content/plugins/composer/vendor/composer/composer/src/Composer/IO/hiddeninput.exe
      • wp-content/plugins/composer/vendor/symfony/console/Symfony/Component/Console/Resources/bin/hiddeninput.exe
    • .bat - Batch File in Windows
      • wp-content/plugins/composer/vendor/justinrainbow/json-schema/docs/make.bat
50,905 lines of code in 664 files:
LanguageFilesBlank linesComment linesLines of code
PHP5209,85115,96944,636
Markdown451,21803,472
JSON58101,637
XML34383801
DOS Batch1231166
make1245124
Python16514828
YAML38025
reStructuredText1202616

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity9.80
▷ Minimum class complexity1.00
▷ Maximum class complexity163.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity61.00
Code structure
Namespaces87
Interfaces31
Traits3
Classes473
▷ Abstract classes265.50%
▷ Concrete classes44794.50%
▷ Final classes20.45%
Methods3,220
▷ Static methods812.52%
▷ Public methods2,60981.02%
▷ Protected methods40712.64%
▷ Private methods2046.34%
Functions1,519
▷ Named functions20.13%
▷ Anonymous functions1,51799.87%
Constants127
▷ Global constants43.15%
▷ Class constants12396.85%
▷ Public constants123100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin