83% bux-woocommerce

Code Review | Bux Woocommerce

WordPress plugin Bux Woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: bux-woocommerce
  • Plugin version: 1.2.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.7.2
  • WordPress version: 6.3.1
  • First release: Jun 21, 2020
  • Latest release: Mar 17, 2022
  • Number of updates: 26
  • Update frequency: every 28.4 days
  • Top authors: askbux (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /4,641 total downloads

Benchmarks

Plugin footprint 83% from 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.08MB] [CPU: ▼6.40ms] 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 /3.54 ▲0.0838.15 ▼0.59
Dashboard /wp-admin3.38 ▲0.0841.53 ▼6.99
Posts /wp-admin/edit.php3.50 ▲0.1447.12 ▼0.06
Add New Post /wp-admin/post-new.php5.96 ▲0.0879.21 ▼13.69
Media Library /wp-admin/upload.php3.30 ▲0.0832.41 ▼4.32

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, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

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 /2,789 ▲2814.27 ▲0.021.65 ▲0.0937.09 ▼2.49
Dashboard /wp-admin2,195 ▲155.62 ▼0.0494.62 ▲8.4543.35 ▲1.22
Posts /wp-admin/edit.php2,097 ▼32.03 ▲0.0140.85 ▲5.7840.57 ▲6.69
Add New Post /wp-admin/post-new.php1,535 ▲918.23 ▼4.74653.02 ▼14.7077.66 ▲20.58
Media Library /wp-admin/upload.php1,400 ▲94.18 ▼0.0693.44 ▼7.9440.62 ▼7.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

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

Optimizations

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.3 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
PHP113569397
SVG1004

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
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions1381.25%
▷ Anonymous functions318.75%
Constants0
▷ 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.50MB 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/screenshot-2.png279.10KB78.17KB▼ 71.99%
bux-woocommerce.png1.90KB1.48KB▼ 22.14%
powered_by_bux.png2.43KB1.92KB▼ 20.65%