93% bux-woocommerce

Code Review | Bux Woocommerce

WordPress plugin Bux Woocommerce scored 93% from 54 tests.

About plugin

  • Plugin page: bux-woocommerce
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.7.2
  • WordPress version: 5.8.1
  • First release: Jun 21, 2020
  • Latest release: Nov 4, 2021
  • Number of updates: 24
  • Update frequency: every 25.2 days
  • Top authors: askbux (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active / 3,175 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Bux Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1231.81 ▲7.24
Dashboard /wp-admin3.06 ▲0.0150.84 ▼21.85
Posts /wp-admin/edit.php3.11 ▲0.0046.39 ▼4.67
Add New Post /wp-admin/post-new.php5.42 ▼0.0278.06 ▼574.38
Media Library /wp-admin/upload.php3.00 ▲0.0032.23 ▼1.36

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Bux Woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8316.32 ▲0.689.33 ▼2.7550.50 ▼5.96
Dashboard /wp-admin2,967 ▲365.88 ▼0.04167.77 ▲9.08126.54 ▼19.00
Posts /wp-admin/edit.php2,739 ▼02.69 ▲0.0177.53 ▼22.32109.07 ▼7.71
Add New Post /wp-admin/post-new.php1,683 ▼018.77 ▼0.01389.82 ▼5.24121.24 ▼5.25
Media Library /wp-admin/upload.php1,807 ▼05.01 ▼0.02161.36 ▲2.02134.27 ▼1.01

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/bux-woocommerce/bux-plugin.php:12

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

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Choose bux as a mode of payment upon checkout), #2 (Present reference code to 7-eleven, Cebuana, LBC, etc)
Please take inspiration from this readme.txt

bux-woocommerce/bux-plugin.php 92% from 13 tests

The main file in "Bux Woocommerce" v. 1.2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bux-woocommerce.php" instead of "bux-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin401 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1381.25%
▷ Anonymous functions318.75%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
10 PNG files occupy 0.97MB with 0.41MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png279.10KB78.17KB▼ 71.99%
images/screenshot-1.png209.75KB55.62KB▼ 73.48%
images/buxlogo.png1.90KB1.48KB▼ 22.14%
buxlogo.png1.90KB1.48KB▼ 22.14%
images/powered_by_bux.png2.43KB1.92KB▼ 20.65%