10% colored-categories

Code Review | Colored Categories

WordPress plugin Colored Categories scored10%from 54 tests.

About plugin

  • Plugin page: colored-categories
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5
  • WordPress version: 6.3.1
  • First release: May 5, 2013
  • Latest release: May 5, 2013
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: mountaininja (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /2,578 total downloads


Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • This plugin did not install gracefully
    • > User deprecated in wp-includes/functions.php+5453
    Function get_all_category_ids is deprecated since version 4.0.0! Use get_terms() instead.

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.36ms] Passed 4 tests

A check of server-side resources used by Colored Categories
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.55 ▲1.53
Dashboard /wp-admin3.32 ▲0.0142.71 ▼5.83
Posts /wp-admin/edit.php3.37 ▲0.0144.05 ▼2.39
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.99 ▼7.62
Media Library /wp-admin/upload.php3.24 ▲0.0135.17 ▼1.60

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

Colored Categories: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.67 ▲0.291.92 ▲0.2444.01 ▲4.43
Dashboard /wp-admin2,195 ▲185.61 ▲0.0882.15 ▼7.7640.10 ▲0.21
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0140.43 ▲3.1639.14 ▲2.40
Add New Post /wp-admin/post-new.php1,531 ▲523.07 ▲0.06685.37 ▲15.2150.56 ▼16.74
Media Library /wp-admin/upload.php1,400 ▼04.21 ▼0.00101.79 ▼11.4546.43 ▼0.30

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • colored-categories
    • widget_recent-posts

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPSE\\coloredcategories\\add_action() in wp-content/plugins/colored-categories/colored-categories.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (This is a screenshot close up of the colored cateogries.), #2 (Fullscreen view from the category screen.)
You can look at the official readme.txt

colored-categories/colored-categories.php Passed 13 tests

"Colored Categories" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
36 characters long description:
Adds a custom color to each category

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 plugin106 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.22MB with 0.15MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot2.png148.84KB48.90KB▼ 67.15%
screenshot1.png72.09KB20.28KB▼ 71.87%