74% category-ajax-chain-selects

Code Review | Category Ajax Chain Selects

WordPress plugin Category Ajax Chain Selects scored74%from 54 tests.

About plugin

  • Plugin page: category-ajax-cha...
  • Plugin version: 3.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.3
  • WordPress version: 6.3.1
  • First release: Aug 21, 2009
  • Latest release: Dec 29, 2011
  • Number of updates: 30
  • Update frequency: every 28.7 days
  • Top authors: peterjharrison (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

70+ active /8,096 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼1.92MB] [CPU: ▼50.48ms] Passed 4 tests

Analyzing server-side resources used by Category Ajax Chain Selects
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.394.33 ▼31.73
Dashboard /wp-admin2.09 ▼1.215.58 ▼41.47
Posts /wp-admin/edit.php2.10 ▼1.266.39 ▼38.31
Add New Post /wp-admin/post-new.php2.09 ▼3.805.24 ▼90.42
Media Library /wp-admin/upload.php2.10 ▼1.145.08 ▼26.49

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Category Ajax Chain Selects
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,900 ▲12913.61 ▼0.777.86 ▲6.1140.43 ▼6.83
Dashboard /wp-admin2,216 ▲285.88 ▲1.00100.09 ▼4.6540.69 ▼0.78
Posts /wp-admin/edit.php2,078 ▼112.04 ▲0.0536.82 ▼0.9134.54 ▼4.59
Add New Post /wp-admin/post-new.php1,521 ▲723.22 ▲5.65607.82 ▼73.0656.86 ▼0.81
Media Library /wp-admin/upload.php1,395 ▲44.15 ▼0.0595.22 ▲0.1145.10 ▲1.13

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function 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 my-ajax-handle handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/category-ajax-chain-selects/chainselects.php:193

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: Screenshot #1 (screenshot-1.png) image required
You can take inspiration from this readme.txt

category-ajax-chain-selects/chainselects.php 92% from 13 tests

"Category Ajax Chain Selects" version 3.7'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: Name the main plugin file the same as the plugin slug ("category-ajax-chain-selects.php" instead of "chainselects.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
Good job! No executable or dangerous file extensions detected129 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1597865
JavaScript118161
CSS1303

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected