84% beecommerce-free-product

Code Review | Beecommerce 3+1 Free Product

WordPress plugin Beecommerce 3+1 Free Product scored84%from 54 tests.

About plugin

  • Plugin page: beecommerce-free-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-4.7.5
  • WordPress version: 6.3.1
  • First release: May 23, 2017
  • Latest release: Feb 20, 2018
  • Number of updates: 9
  • Update frequency: every 30.5 days
  • Top authors: beecommerce (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /823 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Beecommerce 3+1 Free Product
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.28 ▼5.52
Dashboard /wp-admin3.31 ▼0.0341.39 ▼14.62
Posts /wp-admin/edit.php3.36 ▲0.0146.56 ▲0.36
Add New Post /wp-admin/post-new.php5.89 ▲0.0178.98 ▼15.04
Media Library /wp-admin/upload.php3.23 ▲0.0138.01 ▲4.60

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Beecommerce 3+1 Free Product
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.23 ▼1.451.71 ▲0.1139.69 ▲2.03
Dashboard /wp-admin2,206 ▲205.84 ▲0.9499.44 ▼19.7039.77 ▼5.10
Posts /wp-admin/edit.php2,092 ▲32.03 ▲0.0040.66 ▼0.3237.22 ▲2.12
Add New Post /wp-admin/post-new.php1,533 ▲1923.06 ▲5.34702.11 ▲78.9747.58 ▼7.34
Media Library /wp-admin/upload.php1,391 ▲34.19 ▼0.0895.99 ▼1.0144.45 ▲0.68

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/beecommerce-free-product/includes/variation-form-template.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/beecommerce-free-product/includes/simple-form-template.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected


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
2 plugin tags: coupons, woocommerce

beecommerce-free-product/free-product.php 92% from 13 tests

"Beecommerce 3+1 Free Product" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("beecommerce-free-product.php" instead of "free-product.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
Good job! No executable or dangerous file extensions detected754 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity39.50
▷ Minimum class complexity10.00
▷ Maximum class complexity69.00
Average method complexity3.66
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods2689.66%
▷ Protected methods00.00%
▷ Private methods310.34%
▷ Named functions5100.00%
▷ Anonymous functions00.00%
▷ Global constants4100.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
No PNG images were found in this plugin