80% bizaopay-for-woocommerce

Code Review | BizaoPay for Woocommerce

WordPress plugin BizaoPay for Woocommerce scored 80% from 54 tests.

About plugin

  • Plugin page: bizaopay-for-wooc...
  • Plugin version: 0.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 6.3.1
  • First release: Oct 1, 2021
  • Latest release: Jul 15, 2022
  • Number of updates: 9
  • Update frequency: every 35.9 days
  • Top authors: bizao (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 704 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by BizaoPay for Woocommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.90 ▲0.35
Dashboard /wp-admin3.31 ▲0.0144.13 ▼8.19
Posts /wp-admin/edit.php3.42 ▲0.0747.26 ▼0.29
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.70 ▲0.63
Media Library /wp-admin/upload.php3.23 ▲0.0036.39 ▲3.14

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for BizaoPay for Woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.28 ▼1.154.62 ▲2.9841.20 ▼0.13
Dashboard /wp-admin2,206 ▲546.06 ▲0.36107.48 ▲3.9341.14 ▼2.74
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0839.99 ▼0.6735.33 ▲0.33
Add New Post /wp-admin/post-new.php1,544 ▲2518.18 ▼4.97603.56 ▼70.9660.25 ▼8.55
Media Library /wp-admin/upload.php1,388 ▼34.19 ▼0.0295.10 ▼3.5539.27 ▼6.71

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 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)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: payments, online payment, bizao, woocommerce, payment gateway...

bizaopay-for-woocommerce/bizao-payment-for-woocommerce.php 92% from 13 tests

Analyzing the main PHP file in "BizaoPay for Woocommerce" version 0.2.0
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bizaopay-for-woocommerce.php" instead of "bizao-payment-for-woocommerce.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Almost there! Just fix the following issues
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/bizaopay-for-woocommerce/assets/public.crt
566 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1118154566

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity51.00
▷ Minimum class complexity51.00
▷ Maximum class complexity51.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods1470.00%
▷ Protected methods15.00%
▷ Private methods525.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/bizao.png24.38KB8.50KB▼ 65.14%