84% category-list-icon

Code Review | Category List Icon

WordPress plugin Category List Icon scored 84% from 54 tests.

About plugin

  • Plugin page: category-list-icon
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.2.2
  • WordPress version: 5.8.1
  • First release: Feb 5, 2014
  • Latest release: Jun 9, 2015
  • Number of updates: 7
  • Update frequency: every 70.0 days
  • Top authors: kentothemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 2,187 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.86MB] [CPU: ▼185.65ms] Passed 4 tests

Server-side resources used by Category List Icon
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.77 ▼0.955.09 ▼16.61
Dashboard /wp-admin1.79 ▼1.276.69 ▼40.16
Posts /wp-admin/edit.php1.79 ▼1.326.44 ▼35.57
Add New Post /wp-admin/post-new.php1.79 ▼3.645.37 ▼639.88
Media Library /wp-admin/upload.php1.79 ▼1.215.84 ▼26.98

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Category List Icon
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,820 ▲22416.21 ▲0.6513.21 ▲4.4548.15 ▲2.72
Dashboard /wp-admin2,992 ▲585.90 ▼0.04142.99 ▼12.75105.17 ▼3.31
Posts /wp-admin/edit.php2,761 ▲222.72 ▼0.0077.61 ▲2.0591.52 ▲2.78
Add New Post /wp-admin/post-new.php1,698 ▲1518.71 ▲0.66387.42 ▼30.62105.45 ▼5.45
Media Library /wp-admin/upload.php1,829 ▲195.03 ▲0.01158.39 ▲6.23113.72 ▲0.17

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
The following items require your attention
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/category-list-icon/category-list-icon-admin.php:18
    • > PHP Notice
      Undefined index: cli_hidden in wp-content/plugins/category-list-icon/category-list-icon-admin.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/category-list-icon/index.php:14

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Categories list on sidebar.), #2 (Categories list Settings.)
The official readme.txt might help

category-list-icon/index.php 92% from 13 tests

The main file in "Category List Icon" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("category-list-icon.php" instead of "index.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
Success! There were no dangerous files found in this plugin92 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2611485
CSS1107

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
7 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png9.70KB4.06KB▼ 58.11%
cat-images/wordpress.png4.24KB2.42KB▼ 43.03%
cat-images/uncategorized.png0.38KB0.37KB▼ 3.31%
cat-images/facebook.png3.53KB0.85KB▼ 75.98%
screenshot-1.png12.66KB4.94KB▼ 61.02%