89% woo-bought-together

Code Review | WPC Frequently Bought Together for WooCommerce

WordPress plugin WPC Frequently Bought Together for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: woo-bought-together
  • Plugin version: 6.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Dec 1, 2017
  • Latest release: Nov 29, 2023
  • Number of updates: 212
  • Update frequency: every 10.3 days
  • Top authors: wpclever (100%)

Code review

54 tests

User reviews

72 reviews

Install metrics

10,000+ active /404,003 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.67MB] [CPU: ▼3.77ms] Passed 4 tests

A check of server-side resources used by WPC Frequently Bought Together for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.12 ▲0.6637.23 ▼9.61
Dashboard /wp-admin4.02 ▲0.6848.69 ▼11.75
Posts /wp-admin/edit.php4.07 ▲0.7248.45 ▲0.99
Add New Post /wp-admin/post-new.php6.56 ▲0.6793.03 ▲11.57
Media Library /wp-admin/upload.php3.88 ▲0.6537.31 ▲5.30
Essential Kit /wp-admin/admin.php?page=wpclever-kit4.0633.73
About /wp-admin/admin.php?page=wpclever3.8538.33

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WPC Frequently Bought Together for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,867 ▲12014.13 ▼0.221.49 ▼0.4638.98 ▼4.76
Dashboard /wp-admin2,257 ▲795.55 ▼0.1196.41 ▼14.2675.08 ▲32.83
Posts /wp-admin/edit.php2,181 ▲782.01 ▲0.0539.73 ▲2.0034.83 ▲2.66
Add New Post /wp-admin/post-new.php1,753 ▲22722.16 ▼1.16619.22 ▲10.1142.07 ▼9.47
Media Library /wp-admin/upload.php1,477 ▲804.12 ▼0.0894.93 ▼1.7584.81 ▲42.14
Essential Kit /wp-admin/admin.php?page=wpclever-kit5,7412.1339.1962.48
About /wp-admin/admin.php?page=wpclever1,4022.2335.3033.09

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

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
Even though no errors were found, 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
Everything seems fine, however this is by no means an exhaustive test

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

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention: You can look at the official readme.txt

woo-bought-together/wpc-frequently-bought-together.php 92% from 13 tests

The main PHP script in "WPC Frequently Bought Together for WooCommerce" version 6.2.3 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-bought-together.php" instead of "wpc-frequently-bought-together.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
Success! There were no dangerous files found in this plugin8,021 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP5508972,964
PO File78531,2152,173
CSS53681491,740
JavaScript4246631,115
SVG10029

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity136.50
▷ Minimum class complexity1.00
▷ Maximum class complexity498.00
Average method complexity6.65
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods96
▷ Static methods88.33%
▷ Public methods96100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected