83% wc-frequently-purchased-together

Code Review | GERRG Frequently Bought Together for Woocommerce

WordPress plugin GERRG Frequently Bought Together for Woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: wc-frequently-pur...
  • Plugin version: 1.41
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4.2
  • WordPress version: 6.3.1
  • First release: Jul 1, 2020
  • Latest release: Oct 23, 2020
  • Number of updates: 11
  • Update frequency: every 10.4 days
  • Top authors: gregbast1994 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,136 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.10ms] Passed 4 tests

A check of server-side resources used by GERRG Frequently Bought Together for Woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0032.69 ▼7.86
Dashboard /wp-admin3.31 ▲0.0047.03 ▼0.66
Posts /wp-admin/edit.php3.36 ▲0.0046.13 ▲2.49
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.28 ▼9.38
Media Library /wp-admin/upload.php3.23 ▲0.0038.23 ▲1.52

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for GERRG Frequently Bought Together for Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.23 ▼1.154.10 ▲1.9938.19 ▼7.25
Dashboard /wp-admin2,206 ▲185.91 ▼0.12105.96 ▼11.3637.31 ▼8.58
Posts /wp-admin/edit.php2,092 ▲32.17 ▲0.1140.11 ▲3.7533.12 ▲2.00
Add New Post /wp-admin/post-new.php1,535 ▲1623.33 ▲0.30647.58 ▼16.6851.48 ▼3.32
Media Library /wp-admin/upload.php1,388 ▲34.20 ▼0.0397.11 ▼8.1842.33 ▼0.49

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wc-frequently-purchased-together/template/frequently-bought-together-list.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: woocommerce, wc, frequently, wordpress, add-to-cart...

wc-frequently-purchased-together/wc-frequently-bought-together.php 77% from 13 tests

The primary PHP file in "GERRG Frequently Bought Together for Woocommerce" version 1.41 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wc-frequently-purchased-together.php" instead of "wc-frequently-bought-together.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin570 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP3142106238
JavaScript26029114
CSS11196
Sass126085
Markdown110037

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods880.00%
▷ Protected methods00.00%
▷ Private methods220.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.13MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/wcfbt-back-end.png50.83KB17.73KB▼ 65.12%
img/wc-fbt-front-end.png81.11KB29.46KB▼ 63.68%