83% category-color

Code Review | Category Color

WordPress plugin Category Color scored83%from 54 tests.

About plugin

  • Plugin page: category-color
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-6.1
  • WordPress version: 6.3.1
  • First release: Dec 29, 2014
  • Latest release: Mar 6, 2023
  • Number of updates: 32
  • Update frequency: every 93.4 days
  • Top authors: zayedbaloch (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /21,662 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.19ms] Passed 4 tests

This is a short check of server-side resources used by Category Color
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.97 ▼5.80
Dashboard /wp-admin3.34 ▲0.0448.30 ▼1.48
Posts /wp-admin/edit.php3.39 ▲0.0343.67 ▼4.58
Add New Post /wp-admin/post-new.php5.92 ▲0.0386.89 ▼12.89
Media Library /wp-admin/upload.php3.26 ▲0.0336.14 ▲2.40

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Category Color
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.23 ▼1.394.35 ▲2.0337.61 ▼8.76
Dashboard /wp-admin2,206 ▲155.77 ▲0.9195.42 ▼4.5139.40 ▼3.11
Posts /wp-admin/edit.php2,089 ▼32.02 ▲0.0033.56 ▼7.5434.51 ▼1.56
Add New Post /wp-admin/post-new.php1,534 ▲1423.38 ▲0.19670.39 ▲34.2654.07 ▼0.75
Media Library /wp-admin/upload.php1,388 ▲34.24 ▲0.0697.63 ▲4.7343.82 ▲0.93

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

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
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/category-color/fields.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/category-color/fields.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === category-color === )
  • Screenshots: Add images for these screenshots: #1 (Category Edit page), #2 (Category Color Picker)
The official readme.txt might help

category-color/rl_category_color.php 92% from 13 tests

The main PHP file in "Category Color" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("category-color.php" instead of "rl_category_color.php")

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
There were no executable files found in this plugin148 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23845148

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity29.00
▷ Minimum class complexity29.00
▷ Maximum class complexity29.00
Average method complexity2.87
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.18MB with 0.11MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png103.31KB36.10KB▼ 65.05%
screenshot-2.png76.84KB28.32KB▼ 63.14%