99% expandable-accordion-categories-ultimate-for-woocommerce

Code Review | Ultimate WooCommerce Expandable Categories

WordPress plugin Ultimate WooCommerce Expandable Categories scored 99% from 54 tests.

About plugin

  • Plugin page: expandable-accord...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.1.1
  • WordPress version: 5.8.1
  • First release: Jul 21, 2015
  • Latest release: Apr 24, 2019
  • Number of updates: 9
  • Update frequency: every 152.6 days
  • Top authors: magniumthemes (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

800+ active / 18,889 total downloads

Benchmarks

Plugin footprint Passed 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: ▲0.03MB] [CPU: ▼142.84ms] Passed 4 tests

This is a short check of server-side resources used by Ultimate WooCommerce Expandable Categories
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1534.72 ▲13.16
Dashboard /wp-admin3.09 ▲0.0344.67 ▼7.96
Posts /wp-admin/edit.php3.14 ▲0.0336.31 ▼7.60
Add New Post /wp-admin/post-new.php5.45 ▲0.0290.77 ▼554.28
Media Library /wp-admin/upload.php3.03 ▲0.0333.78 ▼1.52

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Ultimate WooCommerce Expandable Categories
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,770 ▲17415.99 ▲0.3610.69 ▲0.4044.44 ▼6.00
Dashboard /wp-admin3,040 ▲1066.18 ▲0.06146.48 ▼4.94122.53 ▲5.58
Posts /wp-admin/edit.php2,840 ▲1012.74 ▲0.0265.57 ▼9.6987.51 ▲8.47
Add New Post /wp-admin/post-new.php1,666 ▼1221.53 ▲2.62280.30 ▼149.34101.86 ▼6.03
Media Library /wp-admin/upload.php1,831 ▲245.10 ▲0.07136.13 ▼19.21139.08 ▲20.52

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

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 everything seems fine, this is not 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 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === expandable-accordion-categories-ultimate-for-woocommerce === )
  • Tags: You are using too many tags: 16 tag instead of maximum 10
You can take inspiration from this readme.txt

expandable-accordion-categories-ultimate-for-woocommerce/mgwoocommercecat.php 92% from 13 tests

The entry point to "Ultimate WooCommerce Expandable Categories" version 1.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("expandable-accordion-categories-ultimate-for-woocommerce.php" instead of "mgwoocommercecat.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected189 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP1323679
JavaScript29148
CSS10038
PO File13322
SVG2002

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.30
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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.43MB with 0.28MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/plugin-wrapper.png25.39KB9.67KB▼ 61.91%
img/hosting-wp-button.png26.03KB9.36KB▼ 64.05%
assets/screenshot-1.png389.76KB128.10KB▼ 67.13%