89% accordion-panel-for-category-and-products

Code Review | Woocommerce Category and Products Accordion Panel

WordPress plugin Woocommerce Category and Products Accordion Panel scored 89% from 54 tests.

About plugin

  • Plugin page: accordion-panel-f...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9
  • WordPress version: 5.9.2
  • First release: May 22, 2016
  • Latest release: Jan 20, 2018
  • Number of updates: 16
  • Update frequency: every 38.1 days
  • Top authors: ikhodal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 3,117 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼295.85ms] Passed 4 tests

Analyzing server-side resources used by Woocommerce Category and Products Accordion Panel
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.1655.51 ▲2.70
Dashboard /wp-admin3.50 ▲0.1032.50 ▼0.24
Posts /wp-admin/edit.php3.73 ▲0.0939.02 ▼0.60
Add New Post /wp-admin/post-new.php6.98 ▲0.0195.69 ▼1,179.58
Media Library /wp-admin/upload.php3.38 ▲0.0824.73 ▼2.97

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 28 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Woocommerce Category and Products Accordion Panel
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,889 ▲16716.20 ▲0.599.33 ▲3.532.31 ▲0.05
Dashboard /wp-admin2,899 ▲416.23 ▲0.10118.26 ▼14.10155.25 ▼2.74
Posts /wp-admin/edit.php2,698 ▲43.23 ▼0.0161.27 ▲1.02143.01 ▲10.57
Add New Post /wp-admin/post-new.php1,668 ▲817.00 ▲0.69398.26 ▼5.55152.39 ▲0.12
Media Library /wp-admin/upload.php1,705 ▲75.55 ▲0.02142.77 ▼5.38177.84 ▼11.25

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_categoryaccordionpanel

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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #17 (admin-add-widget.png), #18 (admin-list-shortcode.png), #19 (admin-add-shortcode.png)
Please take inspiration from this readme.txt

accordion-panel-for-category-and-products/plugin.php 92% from 13 tests

The principal PHP file in "Woocommerce Category and Products Accordion Panel" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("accordion-panel-for-category-and-products.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,264 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PO File1540124

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.23
Average class complexity10.33
▷ Minimum class complexity5.00
▷ Maximum class complexity13.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods1990.48%
▷ Protected methods00.00%
▷ Private methods29.52%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants18100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
8 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/ac_open.png0.30KB0.19KB▼ 35.41%
assets/images/ac_bottom.png0.28KB0.27KB▼ 5.54%
assets/images/view.png1.80KB1.14KB▼ 36.27%
assets/images/cart.png0.48KB0.47KB▼ 1.84%