84% zerowp-term-colors

Code Review | Custom Term Colors

WordPress plugin Custom Term Colors scored84%from 54 tests.

About plugin

  • Plugin page: zerowp-term-colors
  • Plugin version: 1.0.8.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.2
  • WordPress version: 6.3.1
  • First release: Jul 27, 2017
  • Latest release: Jun 27, 2019
  • Number of updates: 24
  • Update frequency: every 29.2 days
  • Top authors: _smartik_ (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,096 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼4.31ms] Passed 4 tests

Analyzing server-side resources used by Custom Term Colors
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1443.01 ▲1.40
Dashboard /wp-admin3.43 ▲0.1352.35 ▲1.14
Posts /wp-admin/edit.php3.55 ▲0.1948.71 ▼6.69
Add New Post /wp-admin/post-new.php6.03 ▲0.1588.44 ▼11.74
Media Library /wp-admin/upload.php3.36 ▲0.1338.60 ▲0.04

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom Term Colors
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5413.72 ▼0.561.96 ▼0.1444.89 ▼2.73
Dashboard /wp-admin2,206 ▲155.90 ▲0.99102.85 ▼1.1041.51 ▲1.29
Posts /wp-admin/edit.php2,086 ▼61.99 ▼0.0237.40 ▼0.6532.30 ▼3.23
Add New Post /wp-admin/post-new.php1,533 ▲1423.35 ▲0.22694.97 ▲66.9659.44 ▲6.97
Media Library /wp-admin/upload.php1,385 ▼64.26 ▲0.0197.32 ▼6.2544.42 ▼3.73

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 16× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      require_once(ZTCOLORS_PATHwarnings/abstract-warning.php): failed to open stream: No such file or directory in wp-content/plugins/zerowp-term-colors/warnings/php-warning.php on line 2
    • > PHP Warning
      include_once(ZTCOLORS_PATHfunctions.php): failed to open stream: No such file or directory in wp-content/plugins/zerowp-term-colors/plugin.php on line 88
    • > PHP Warning
      include_once(): Failed opening 'ZTCOLORS_PATHfunctions.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/zerowp-term-colors/plugin.php on line 88
    • > PHP Warning
      include_once(ZTCOLORS_PATHautoloader.php): failed to open stream: No such file or directory in wp-content/plugins/zerowp-term-colors/plugin.php on line 87
    • > PHP Warning
      Use of undefined constant ZTCOLORS_VERSION - assumed 'ZTCOLORS_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/zerowp-term-colors/plugin.php on line 83
    • > PHP Warning
      Use of undefined constant ZTCOLORS_PATH - assumed 'ZTCOLORS_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/zerowp-term-colors/warnings/php-warning.php on line 2
    • > PHP Warning
      require_once(ZTCOLORS_PATHwarnings/abstract-warning.php): failed to open stream: No such file or directory in wp-content/plugins/zerowp-term-colors/warnings/noplugin-warning.php on line 2
    • > PHP Warning
      include_once(): Failed opening 'ZTCOLORS_PATHautoloader.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/zerowp-term-colors/plugin.php on line 87
    • > PHP Fatal error
      Uncaught Error: Class 'ZTColors\\Assets\\Manage' not found in wp-content/plugins/zerowp-term-colors/plugin.php:90
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/zerowp-term-colors/components/Setup/component.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: These screenshots lack descriptions #24, #25 in zerowp-term-colors/assets to your readme.txt
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === zerowp-term-colors === )
You can look at the official readme.txt

zerowp-term-colors/zerowp-term-colors.php Passed 13 tests

The main PHP file in "Custom Term Colors" ver. 1.0.8.2 adds more information about the plugin and also serves as the entry point for this plugin
67 characters long description:
Easy user interface to assign colors to any term from any taxonomy.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected1,418 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
LESS310498694
PHP15232329609
CSS32281
JSON10031
JavaScript1313

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity6.60
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity1.98
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes10
▷ Abstract classes110.00%
▷ Concrete classes990.00%
▷ Final classes222.22%
Methods58
▷ Static methods11.72%
▷ Public methods5594.83%
▷ Protected methods35.17%
▷ Private methods00.00%
Functions8
▷ Named functions450.00%
▷ Anonymous functions450.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin