84% pl8app-bep20-cryptocurrency-payment-gateway-for-woocommerce

Code Review | pl8app Cryptocurrency BEP20 Payment Gateway For WooCommerce

WordPress plugin pl8app Cryptocurrency BEP20 Payment Gateway For WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: pl8app-bep20-cryp...
  • Plugin version: 2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Oct 20, 2021
  • Latest release: Jan 31, 2023
  • Number of updates: 19
  • Update frequency: every 24.6 days
  • Top authors: pl8apptoken (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,372 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by pl8app Cryptocurrency BEP20 Payment Gateway For WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.44 ▼6.94
Dashboard /wp-admin3.31 ▼0.0349.12 ▼19.77
Posts /wp-admin/edit.php3.37 ▲0.0150.99 ▲3.01
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.40 ▼14.16
Media Library /wp-admin/upload.php3.24 ▲0.0135.95 ▲0.49

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 58 new files
Database: 3 new tables, 7 new options
New tables
wp_pl8apppro_carousel
wp_pl8apppro_hd_addresses
wp_pl8apppro_payments
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
pl8apppro_redux_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

pl8app Cryptocurrency BEP20 Payment Gateway For WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.35 ▲0.011.95 ▲0.1242.89 ▼0.25
Dashboard /wp-admin2,198 ▲275.59 ▼0.0387.81 ▼2.3038.85 ▲0.37
Posts /wp-admin/edit.php2,097 ▼32.03 ▲0.0135.63 ▼1.2630.82 ▼4.71
Add New Post /wp-admin/post-new.php1,531 ▲523.20 ▼0.01696.85 ▲63.5965.98 ▲2.73
Media Library /wp-admin/upload.php1,394 ▼64.11 ▼0.16105.68 ▼4.7541.48 ▼3.93

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • pl8apppro_redux_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/pl8app-bep20-cryptocurrency-payment-gateway-for-woocommerce/src/pl8app_Gateway.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pl8app-bep20-cryptocurrency-payment-gateway-for-woocommerce/pl8app-cryptocurrency-bep20-payment-gateway-for-woocommerce.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pl8app-bep20-cryptocurrency-payment-gateway-for-woocommerce/src/pl8app_Admin.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/pl8app-bep20-cryptocurrency-payment-gateway-for-woocommerce/src/pl8app_Hooks.php:327

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

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
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 25 tag instead of maximum 10
Please take inspiration from this readme.txt

pl8app-bep20-cryptocurrency-payment-gateway-for-woocommerce/pl8app-cryptocurrency-bep20-payment-gateway-for-woocommerce.php 92% from 13 tests

The principal PHP file in "pl8app Cryptocurrency BEP20 Payment Gateway For WooCommerce" v. 2.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("pl8app-bep20-cryptocurrency-payment-gateway-for-woocommerce.php" instead of "pl8app-cryptocurrency-bep20-payment-gateway-for-woocommerce.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected23,028 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
SVG3009,552
PHP292,6251,6008,492
CSS51,561104,851
JavaScript2320133

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity35.12
▷ Minimum class complexity1.00
▷ Maximum class complexity233.00
Average method complexity4.35
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes40
▷ Abstract classes00.00%
▷ Concrete classes40100.00%
▷ Final classes00.00%
Methods409
▷ Static methods23457.21%
▷ Public methods37591.69%
▷ Protected methods00.00%
▷ Private methods348.31%
Functions42
▷ Named functions4197.62%
▷ Anonymous functions12.38%
Constants60
▷ Global constants4981.67%
▷ Class constants1118.33%
▷ Public constants11100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/1_pay_mm_over.png26.63KB11.88KB▼ 55.39%
assets/img/0x_logo_small.png0.81KB0.67KB▼ 17.41%
assets/img/pl8app_logo.png24.22KB3.50KB▼ 85.54%
assets/img/1_pay_mm_off.png25.77KB11.17KB▼ 56.67%
assets/img/tmp_qrcode.png0.77KB0.75KB▼ 2.65%