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

Code Review | Woocommerce Category and Products Accordion Panel

WordPress plugin Woocommerce Category and Products Accordion Panel scored89%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: 6.3.1
  • 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

60+ active /3,427 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.04MB] [CPU: ▼5.58ms] Passed 4 tests

This is a short check of server-side resources used by Woocommerce Category and Products Accordion Panel
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0534.78 ▼8.46
Dashboard /wp-admin3.34 ▲0.0445.77 ▼3.27
Posts /wp-admin/edit.php3.46 ▲0.1051.45 ▲4.66
Add New Post /wp-admin/post-new.php5.93 ▲0.0491.09 ▼9.17
Media Library /wp-admin/upload.php3.27 ▲0.0434.10 ▼1.43

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 28 new files
Database: no new tables, 7 new options
New WordPress options
widget_categoryaccordionpanel
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Woocommerce Category and Products Accordion Panel: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,900 ▲16513.66 ▼0.644.96 ▲3.1237.89 ▼9.51
Dashboard /wp-admin2,216 ▲254.79 ▼1.12100.54 ▼4.6040.13 ▲2.20
Posts /wp-admin/edit.php2,099 ▲71.99 ▼0.0039.61 ▼0.8835.41 ▲1.60
Add New Post /wp-admin/post-new.php1,521 ▼822.83 ▼0.30595.96 ▼40.3051.44 ▼1.52
Media Library /wp-admin/upload.php1,395 ▲74.17 ▼0.0894.36 ▼8.9041.54 ▼3.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_categoryaccordionpanel
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output 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
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #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

This is the main PHP file of "Woocommerce Category and Products Accordion Panel" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: It is recommended to name the main PHP file 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 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected1,264 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12184349850
JavaScript2162170
PO File1540124
CSS2912120

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
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
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods1990.48%
▷ Protected methods00.00%
▷ Private methods29.52%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants18
▷ 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/cart.png0.48KB0.47KB▼ 1.84%
assets/images/view-more.png0.36KB0.33KB▼ 7.14%
assets/images/ac_bottom.png0.28KB0.27KB▼ 5.54%
assets/images/ac_close.png0.27KB0.17KB▼ 34.80%
assets/images/view.png1.80KB1.14KB▼ 36.27%