78% jquery-categories-list

Code Review | JS Categories List Widget

WordPress plugin JS Categories List Widget scored78%from 54 tests.

About plugin

  • Plugin page: jquery-categories...
  • Plugin version: 4.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Dec 7, 2010
  • Latest release: Jun 4, 2023
  • Number of updates: 66
  • Update frequency: every 69.1 days
  • Top authors: skatox (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

1,000+ active /68,474 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.13MB] [CPU: ▼8.11ms] Passed 4 tests

Server-side resources used by JS Categories List Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1435.65 ▼6.90
Dashboard /wp-admin3.44 ▲0.0945.49 ▼18.19
Posts /wp-admin/edit.php3.55 ▲0.1945.57 ▼0.28
Add New Post /wp-admin/post-new.php6.02 ▲0.1480.95 ▼7.07
Media Library /wp-admin/upload.php3.36 ▲0.1335.88 ▲2.68

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 59 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_jcl_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for JS Categories List Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲5714.18 ▼0.121.77 ▲0.0441.91 ▼1.37
Dashboard /wp-admin2,206 ▲184.85 ▼0.07106.98 ▼15.4939.45 ▼5.39
Posts /wp-admin/edit.php2,086 ▼62.04 ▼0.0137.49 ▼1.5831.00 ▲0.22
Add New Post /wp-admin/post-new.php6,354 ▲4,82127.62 ▲4.39922.51 ▲226.2550.56 ▼14.47
Media Library /wp-admin/upload.php1,388 ▼04.21 ▼0.05104.02 ▲2.5344.73 ▲1.94

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_jcl_widget
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/jquery-categories-list/jquery-categories-list.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/jquery-categories-list/classes/legacy/class-jcl-legacy-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jquery-categories-list/classes/class-js-categories-list-block.php:114
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/jquery-categories-list/classes/class-js-categories-list-rest-endpoints.php:99

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Here you can see a list of categories, those with sub-categories will habe a link on the right to expand its childs.), #2 (Here you can see a list of categories and its sub-categories expanded.)
The official readme.txt is a good inspiration

jquery-categories-list/jquery-categories-list.php 85% from 13 tests

"JS Categories List Widget" version 4.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Requires at least: Required version must match the one declared in readme.txt ("5.8" instead of "6.1")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected30,913 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
JSON40028,251
JavaScript23199971,466
PHP7119163638
PO File5153175365
CSS42510124
Sass315169

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity21.25
▷ Minimum class complexity4.00
▷ Maximum class complexity44.00
Average method complexity3.89
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods29
▷ Static methods310.34%
▷ Public methods1758.62%
▷ Protected methods724.14%
▷ Private methods517.24%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants7
▷ Global constants342.86%
▷ Class constants457.14%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.17MB with 0.11MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png68.82KB23.90KB▼ 65.27%
screenshot-2.png54.20KB17.85KB▼ 67.07%
screenshot-3.png48.83KB17.13KB▼ 64.92%