89% woo-bought-products

Code Review | Woocommerce Bought Products

WordPress plugin Woocommerce Bought Products scored89%from 54 tests.

About plugin

  • Plugin page: woo-bought-products
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 7, 2019
  • Latest release: Jul 26, 2023
  • Number of updates: 10
  • Update frequency: every 166.2 days
  • Top authors: yasirkhalifa (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /603 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 gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.65ms] Passed 4 tests

A check of server-side resources used by Woocommerce Bought Products
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.12 ▼0.65
Dashboard /wp-admin3.34 ▲0.0445.98 ▼1.38
Posts /wp-admin/edit.php3.39 ▲0.0448.35 ▼11.34
Add New Post /wp-admin/post-new.php5.92 ▲0.0489.09 ▼17.21
Media Library /wp-admin/upload.php3.27 ▲0.0437.69 ▲0.54

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
yboprol_options_name
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woocommerce Bought Products
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲7913.20 ▼1.181.54 ▼0.3038.88 ▼5.06
Dashboard /wp-admin2,221 ▲334.84 ▼0.02114.79 ▲10.5342.32 ▼1.84
Posts /wp-admin/edit.php2,104 ▲152.06 ▲0.0439.54 ▼0.7434.72 ▼2.52
Add New Post /wp-admin/post-new.php1,552 ▲1018.35 ▲0.20606.57 ▼1.0648.05 ▼24.10
Media Library /wp-admin/upload.php1,403 ▲184.26 ▼0.0297.08 ▼7.0246.88 ▲2.16

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Requires at least: Invalid plugin version format
The official readme.txt might help

woo-bought-products/woocommerce-bought-products.php 92% from 13 tests

Analyzing the main PHP file in "Woocommerce Bought Products" version 1.2
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-products.php" instead of "woocommerce-bought-products.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected173 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2010171
CSS1002

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity5.83
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected