90% product-category-dropdowns

Code Review | Product Category Dropdowns

WordPress plugin Product Category Dropdowns scored90%from 54 tests.

About plugin

  • Plugin page: product-category-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Jul 30, 2019
  • Latest release: Aug 20, 2023
  • Number of updates: 9
  • Update frequency: every 164.6 days
  • Top authors: pektsekye (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

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

Server-side resources used by Product Category Dropdowns
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0145.57 ▲1.33
Dashboard /wp-admin3.32 ▼0.0352.84 ▼19.14
Posts /wp-admin/edit.php3.37 ▲0.0150.12 ▲0.22
Add New Post /wp-admin/post-new.php5.90 ▲0.01102.55 ▼2.57
Media Library /wp-admin/upload.php3.24 ▲0.0141.86 ▼10.96

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Product Category Dropdowns
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.26 ▼0.082.31 ▲0.4844.39 ▼6.14
Dashboard /wp-admin2,198 ▲215.59 ▼0.0886.81 ▼19.5643.33 ▼2.24
Posts /wp-admin/edit.php2,097 ▼31.98 ▼0.0136.90 ▲1.0733.79 ▲0.99
Add New Post /wp-admin/post-new.php1,526 ▲12123.05 ▲5.18693.49 ▲34.7262.47 ▲2.81
Media Library /wp-admin/upload.php1,397 ▲34.09 ▼0.07116.17 ▼22.3250.28 ▼9.77

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
No output text or server-side errors detected on direct access of PHP files

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 Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: dependent category selects, product categories, category dropdowns, woocommerce categories, search by category

product-category-dropdowns/product-category-dropdowns.php Passed 13 tests

Analyzing the main PHP file in "Product Category Dropdowns" version 1.0.0
59 characters long description:
Displays product categories as dependent drop-down selects.

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 plugin286 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP49419190
JavaScript156095
CSS1101

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity6.00
▷ Minimum class complexity2.00
▷ Maximum class complexity10.00
Average method complexity1.79
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods19
▷ Static methods15.26%
▷ Public methods1894.74%
▷ Protected methods00.00%
▷ Private methods15.26%
Functions1
▷ Named functions1100.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 images were found in this plugin