83% wpb-woocommerce-accordain

Code Review | WPB Products Accordion for WooCommerce

WordPress plugin WPB Products Accordion for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: wpb-woocommerce-a...
  • Plugin version: 1.03
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.4
  • WordPress version: 6.3.1
  • First release: Jul 1, 2014
  • Latest release: Mar 11, 2020
  • Number of updates: 15
  • Update frequency: every 138.7 days
  • Top authors: wpbean (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /3,321 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.01MB] [CPU: ▼11.42ms] Passed 4 tests

Server-side resources used by WPB Products Accordion for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0234.73 ▼3.56
Dashboard /wp-admin3.33 ▼0.0245.28 ▼12.17
Posts /wp-admin/edit.php3.38 ▲0.0244.28 ▼8.15
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.59 ▼21.78
Media Library /wp-admin/upload.php3.25 ▲0.0233.17 ▼2.13

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WPB Products Accordion for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲14813.84 ▼0.449.54 ▲7.7139.01 ▲0.50
Dashboard /wp-admin2,200 ▲235.61 ▲0.0484.75 ▼7.2037.27 ▼6.13
Posts /wp-admin/edit.php2,102 ▲21.95 ▼0.0734.98 ▼0.7232.21 ▼8.92
Add New Post /wp-admin/post-new.php1,540 ▲1423.03 ▼0.17575.83 ▼28.9654.46 ▼24.02
Media Library /wp-admin/upload.php1,393 ▲24.21 ▼0.0796.32 ▼3.8142.78 ▼2.77

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wpb-woocommerce-accordain/main.php:27

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)
There were no browser issues found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention: You can look at the official readme.txt

wpb-woocommerce-accordain/main.php 77% from 13 tests

The main PHP script in "WPB Products Accordion for WooCommerce" version 1.03 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wpb-woocommerce-accordain.php" instead of "main.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 206 characters long)
  • Requires at least: Required version must match the one declared in readme.txt ("4.0" instead of "3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin463 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript278107266
PHP14428101
CSS10196

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/down.png0.45KB0.54KB0.00%