83% woo-payment-gateway-neutron-pay

Code Review | Accept Bitcoin instantly via Neutronpay

WordPress plugin Accept Bitcoin instantly via Neutronpay scored83%from 54 tests.

About plugin

  • Plugin page: woo-payment-gatew...
  • Plugin version: 1.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 7, 2019
  • Latest release: Sep 13, 2023
  • Number of updates: 37
  • Update frequency: every 45.0 days
  • Top authors: resourcedesign (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,216 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Accept Bitcoin instantly via Neutronpay
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.63 ▼0.62
Dashboard /wp-admin3.31 ▲0.0148.81 ▲0.15
Posts /wp-admin/edit.php3.36 ▲0.0149.32 ▲1.10
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.02 ▼18.11
Media Library /wp-admin/upload.php3.23 ▲0.0139.67 ▲0.09

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Accept Bitcoin instantly via Neutronpay
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.72 ▲0.432.01 ▲0.4441.32 ▼0.07
Dashboard /wp-admin2,195 ▲185.61 ▼0.0595.66 ▲5.3743.38 ▼0.12
Posts /wp-admin/edit.php2,100 ▼32.02 ▲0.0239.26 ▲1.7639.53 ▲6.76
Add New Post /wp-admin/post-new.php1,526 ▼1223.53 ▲5.26676.07 ▲20.8957.51 ▼7.58
Media Library /wp-admin/upload.php1,394 ▼64.22 ▲0.01104.67 ▼3.8844.88 ▼3.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • 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
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Neutronpay\\Merchant' not found in wp-content/plugins/woo-payment-gateway-neutron-pay/lib/neutronpay/lib/Merchant/Order.php:9

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
The official readme.txt might help

woo-payment-gateway-neutron-pay/neutronpay.php 85% from 13 tests

"Accept Bitcoin instantly via Neutronpay" version 1.3.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woo-payment-gateway-neutron-pay.php" instead of "neutronpay.php")

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
Everything looks great! No dangerous files found in this plugin700 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP1115398688
Markdown111012

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity5.41
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods37
▷ Static methods1027.03%
▷ Public methods3697.30%
▷ Protected methods00.00%
▷ Private methods12.70%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants466.67%
▷ Class constants233.33%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/neutronpay.png2.18KB2.09KB▼ 4.04%
assets/images/bitcoin.png3.06KB2.06KB▼ 32.77%