84% busha-pay

Code Review | Busha Pay Payment Gateway for WooCommerce

WordPress plugin Busha Pay Payment Gateway for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: busha-pay
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.9-5.2
  • WordPress version: 6.3.1
  • First release: Aug 17, 2019
  • Latest release: Aug 17, 2019
  • Number of updates: 2
  • Update frequency: every 4.0 days
  • Top authors: busha (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /548 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.47ms] Passed 4 tests

A check of server-side resources used by Busha Pay Payment Gateway for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.13 ▼6.69
Dashboard /wp-admin3.32 ▲0.0250.08 ▼1.09
Posts /wp-admin/edit.php3.37 ▲0.0248.11 ▼1.61
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.88 ▼8.48
Media Library /wp-admin/upload.php3.25 ▲0.0241.48 ▲2.52

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Busha Pay Payment Gateway for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5413.79 ▼0.771.79 ▼0.5041.47 ▼4.56
Dashboard /wp-admin2,206 ▲185.83 ▼0.03107.26 ▼12.7943.73 ▲1.48
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0135.68 ▼5.0530.64 ▼0.81
Add New Post /wp-admin/post-new.php1,533 ▼023.22 ▲0.02623.21 ▼72.9356.93 ▲3.19
Media Library /wp-admin/upload.php1,388 ▼34.19 ▲0.0395.84 ▼3.2743.40 ▼5.04

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/busha-pay/busha-pay.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
You can look at the official readme.txt

busha-pay/busha-pay.php 92% from 13 tests

Analyzing the main PHP file in "Busha Pay Payment Gateway for WooCommerce" version 1.0.0
The following require your attention:
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.0" instead of "3.0.9")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin605 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3121157489
Markdown156080
JavaScript110636

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity27.50
▷ Minimum class complexity18.00
▷ Maximum class complexity37.00
Average method complexity4.19
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods529.41%
▷ Public methods1694.12%
▷ Protected methods15.88%
▷ Private methods00.00%
Functions13
▷ Named functions1292.31%
▷ Anonymous functions17.69%
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
2 PNG files occupy 0.03MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/bitcoin.png16.21KB1.34KB▼ 91.71%
assets/images/ethereum.png16.16KB1.31KB▼ 91.89%