84% heliumpay-payment-gateway

Code Review | WooCommerce Heliumpay Payment Gateway

WordPress plugin WooCommerce Heliumpay Payment Gateway scored84%from 54 tests.

About plugin

  • Plugin page: heliumpay-payment...
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 21, 2021
  • Latest release: Nov 17, 2022
  • Number of updates: 10
  • Update frequency: every 39.3 days
  • Top authors: heliumpay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /510 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.01MB] [CPU: ▼5.88ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Heliumpay Payment Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.70 ▼3.83
Dashboard /wp-admin3.31 ▲0.0152.18 ▼4.47
Posts /wp-admin/edit.php3.36 ▲0.0147.99 ▼5.86
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.18 ▼9.36
Media Library /wp-admin/upload.php3.23 ▲0.0135.74 ▼2.65

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Heliumpay Payment Gateway
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.19 ▼0.161.91 ▲0.1845.44 ▲2.28
Dashboard /wp-admin2,205 ▲345.68 ▲0.1288.64 ▼1.2141.39 ▼1.35
Posts /wp-admin/edit.php2,107 ▲41.95 ▼0.0542.16 ▲6.9438.17 ▼4.61
Add New Post /wp-admin/post-new.php1,535 ▲923.11 ▲0.01662.20 ▼12.2557.58 ▼3.56
Media Library /wp-admin/upload.php1,410 ▲104.19 ▼0.0295.30 ▼13.6844.70 ▼2.75

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/heliumpay-payment-gateway/heliumpay-payment-gateway.php
    • > /wp-content/plugins/heliumpay-payment-gateway/WC_Gateway_Heliumpay_Ajax_Backend.php
    • > /wp-content/plugins/heliumpay-payment-gateway/WC_Gateway_Heliumpay_Admin.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #3 (**Frontend** The shortcode will be replaced by a form. The checks deliver different messages.) image missing
The official readme.txt is a good inspiration

heliumpay-payment-gateway/heliumpay-payment-gateway.php Passed 13 tests

"WooCommerce Heliumpay Payment Gateway" version 1.0.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
91 characters long description:
NOT LONGER ACTIVE: Take Helium (HNT) cryptocurrency payments on your store using Heliumpay.

Code Analysis Passed 3 tests

File types Passed 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
No dangerous file extensions were detected21,884 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
CSS61,4684113,008
JavaScript62,0481,6907,805
PHP487110676
HTML180395

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity28.67
▷ Minimum class complexity8.00
▷ Maximum class complexity64.00
Average method complexity4.33
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods24
▷ Static methods28.33%
▷ Public methods1770.83%
▷ Protected methods00.00%
▷ Private methods729.17%
Functions17
▷ Named functions529.41%
▷ Anonymous functions1270.59%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
pay/favicon.png1.95KB1.62KB▼ 17.16%