89% webmiro-bluepay-woo-addon

Code Review | Bluepay Payment Gateway WooCommerce Addon

WordPress plugin Bluepay Payment Gateway WooCommerce Addon scored89%from 54 tests.

About plugin

  • Plugin page: webmiro-bluepay-w...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 26, 2016
  • Latest release: Jul 30, 2016
  • Number of updates: 6
  • Update frequency: every 25.8 days
  • Top authors: nazrulhassanmca (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,419 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.54ms] Passed 4 tests

Server-side resources used by Bluepay Payment Gateway WooCommerce Addon
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.09 ▼1.29
Dashboard /wp-admin3.31 ▲0.0149.05 ▼3.72
Posts /wp-admin/edit.php3.36 ▲0.0145.71 ▼0.55
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.83 ▼8.10
Media Library /wp-admin/upload.php3.23 ▲0.0136.98 ▼1.04

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Bluepay Payment Gateway WooCommerce Addon
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.111.74 ▲0.0844.52 ▼1.70
Dashboard /wp-admin2,195 ▲155.52 ▼0.1185.13 ▼14.7938.91 ▼3.93
Posts /wp-admin/edit.php2,097 ▼31.96 ▼0.0634.74 ▼2.9934.03 ▼3.28
Add New Post /wp-admin/post-new.php1,526 ▼223.77 ▲0.83686.01 ▲22.6354.73 ▼5.34
Media Library /wp-admin/upload.php1,394 ▼64.19 ▲0.07101.14 ▼13.8444.08 ▼2.92

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tested up to: Invalid plugin version format
  • Requires at least: Invalid plugin version format
You can look at the official readme.txt

webmiro-bluepay-woo-addon/webmicro-bluepay-woo.php 92% from 13 tests

"Bluepay Payment Gateway WooCommerce Addon" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("webmiro-bluepay-woo-addon.php" instead of "webmicro-bluepay-woo.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected818 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP216689818

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.23
Average class complexity48.00
▷ Minimum class complexity37.00
▷ Maximum class complexity59.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods85
▷ Static methods11.18%
▷ Public methods8498.82%
▷ Protected methods11.18%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ 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
7 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/bluepay.png3.63KB2.39KB▼ 34.26%
images/discover.png1.28KB1.30KB0.00%
images/dinersclub.png1.27KB1.17KB▼ 8.22%
images/visa.png1.25KB1.29KB0.00%
images/mastercard.png1.62KB1.40KB▼ 13.37%