90% pw-woocommerce-bogo-free

Code Review | PW WooCommerce BOGO

WordPress plugin PW WooCommerce BOGO scored90%from 54 tests.

About plugin

  • Plugin page: pw-woocommerce-bo...
  • Plugin version: 2.48
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Feb 28, 2017
  • Latest release: Nov 28, 2023
  • Number of updates: 73
  • Update frequency: every 33.7 days
  • Top authors: pimwick (100%)

Code review

54 tests

User reviews

47 reviews

Install metrics

800+ active /37,176 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by PW WooCommerce BOGO
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0834.79 ▼2.56
Dashboard /wp-admin3.38 ▲0.0447.04 ▼11.09
Posts /wp-admin/edit.php3.50 ▲0.1449.29 ▼1.38
Add New Post /wp-admin/post-new.php5.97 ▲0.0895.28 ▼8.11
Media Library /wp-admin/upload.php3.31 ▲0.0833.04 ▲1.56

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

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

Browser metrics Passed 4 tests

PW WooCommerce BOGO: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲314.41 ▼0.301.85 ▼0.0536.22 ▼4.19
Dashboard /wp-admin2,198 ▲205.62 ▼0.3193.45 ▼25.1342.62 ▼3.84
Posts /wp-admin/edit.php2,100 ▼01.95 ▲0.0039.41 ▼4.3536.86 ▼0.91
Add New Post /wp-admin/post-new.php1,526 ▼023.11 ▼0.35571.46 ▼125.5256.24 ▼16.26
Media Library /wp-admin/upload.php1,403 ▼04.20 ▲0.0496.90 ▼3.3440.89 ▼1.49

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: pimwick, products, sale, discount, utilities...

pw-woocommerce-bogo-free/pw-woocommerce-bogo-free.php 92% from 13 tests

"PW WooCommerce BOGO" version 2.48's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("4.5" instead of "4.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
Good job! No executable or dangerous file extensions detected496 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP210656452
CSS210044

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity34.00
▷ Minimum class complexity1.00
▷ Maximum class complexity67.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods31
▷ Static methods516.13%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/pimwick-icon-120x120.png3.89KB1.99KB▼ 48.71%