84% colorful-categories

Code Review | Colorful Categories

WordPress plugin Colorful Categories scored84%from 54 tests.

About plugin

  • Plugin page: colorful-categories
  • Plugin version: 2.0.19
  • PHP version: 7.4.16
  • WordPress compatibility: 7.0-6.4
  • WordPress version: 6.3.1
  • First release: Sep 19, 2014
  • Latest release: Oct 27, 2023
  • Number of updates: 59
  • Update frequency: every 56.4 days
  • Top authors: madeinua (64.41%)loyaltymanufaktur (37.29%)

Code review

54 tests

User reviews

11 reviews

Install metrics

3,000+ active /52,732 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼3.92ms] Passed 4 tests

Server-side resources used by Colorful Categories
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1140.02 ▲0.76
Dashboard /wp-admin3.41 ▲0.1048.45 ▲0.01
Posts /wp-admin/edit.php3.52 ▲0.1645.02 ▼7.36
Add New Post /wp-admin/post-new.php5.99 ▲0.1079.94 ▼9.08
Media Library /wp-admin/upload.php3.33 ▲0.1036.05 ▲4.02

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
colorful-categories-adbv
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_colorful_categories_widget

Browser metrics Passed 4 tests

Colorful Categories: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.34 ▼0.031.83 ▼0.0044.93 ▲5.48
Dashboard /wp-admin2,195 ▲215.51 ▼0.0798.02 ▲11.4343.48 ▲0.23
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0233.52 ▼3.1934.21 ▼3.45
Add New Post /wp-admin/post-new.php1,526 ▼223.57 ▲0.37665.06 ▼27.0951.50 ▼4.63
Media Library /wp-admin/upload.php1,400 ▼04.12 ▼0.01101.19 ▼13.4245.24 ▼5.06

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-comments
    • widget_colorful_categories_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • colorful-categories-adbv
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/colorful-categories/widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/colorful-categories/colorful-categories.php:26

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 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: colourful categories, categories, coloured, widget

colorful-categories/colorful-categories.php 92% from 13 tests

The main PHP script in "Colorful Categories" version 2.0.19 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin568 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP291153544
JavaScript17024

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity28.50
▷ Minimum class complexity25.00
▷ Maximum class complexity32.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods22
▷ Static methods731.82%
▷ Public methods2195.45%
▷ Protected methods14.55%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected