83% category-subcategory-list-widget

Code Review | Category and Subcategory list widget

WordPress plugin Category and Subcategory list widget scored 83% from 54 tests.

About plugin

  • Plugin page: category-subcateg...
  • Plugin version: 6.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-6.1
  • WordPress version: 6.3.1
  • First release: Feb 26, 2016
  • Latest release: Feb 13, 2023
  • Number of updates: 108
  • Update frequency: every 23.6 days
  • Top authors: murali-indiacitys (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active / 32,994 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
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.17ms] Passed 4 tests

Server-side resources used by Category and Subcategory list widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.78 ▼2.29
Dashboard /wp-admin3.36 ▲0.0548.65 ▼0.15
Posts /wp-admin/edit.php3.47 ▲0.1248.47 ▲0.78
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.65 ▼11.02
Media Library /wp-admin/upload.php3.26 ▲0.0338.43 ▲6.13

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Category and Subcategory list widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,946 ▲21114.71 ▲0.341.79 ▼0.0043.49 ▼0.60
Dashboard /wp-admin2,355 ▲1706.41 ▲1.50117.05 ▲10.0736.71 ▼9.12
Posts /wp-admin/edit.php2,258 ▲1693.29 ▲1.2947.49 ▲14.3030.59 ▼2.73
Add New Post /wp-admin/post-new.php1,676 ▲13622.38 ▼0.80598.12 ▼48.0230.34 ▼27.28
Media Library /wp-admin/upload.php1,399 ▲84.17 ▼0.0479.21 ▼24.9440.81 ▼8.13

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • widget_core_special_widgets_categories
    • can_compress_scripts
    • theysaidso_admin_options
    • 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
Even though everything seems fine, this is not 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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/category-subcategory-list-widget/category-list-widget.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 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
Please fix the following attributes:
  • Donate link: Please fix this invalid url: ""
  • Screenshots: A description for screenshot #8 is required in category-subcategory-list-widget/assets to your readme.txt
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
You can look at the official readme.txt

category-subcategory-list-widget/category-list-widget.php 92% from 13 tests

"Category and Subcategory list widget" version 6.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("category-subcategory-list-widget.php" instead of "category-list-widget.php")

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
There were no executable files found in this plugin2,348 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
CSS235491,203
PO File15285291808
PHP110041277
JavaScript121560

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity14.50
▷ Minimum class complexity7.00
▷ Maximum class complexity22.00
Average method complexity5.50
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
22 PNG files occupy 1.50MB with 0.47MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png207.14KB76.25KB▼ 63.19%
css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png0.13KB0.18KB0.00%
css/images/ui-icons_222222_256x240.png6.68KB4.20KB▼ 37.05%
css/images/ui-bg_flat_10_000000_40x100.png0.17KB0.08KB▼ 51.12%
css/images/ui-icons_ef8c08_256x240.png4.27KB4.11KB▼ 3.78%