10% woo-payment-gateway-bitcoinus

Code Review | WooCommerce Payment Gateway - Bitcoinus

WordPress plugin WooCommerce Payment Gateway - Bitcoinus scored10%from 54 tests.

About plugin

  • Plugin page: woo-payment-gatew...
  • Plugin version: 2.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3.1
  • WordPress version: 6.3.1
  • First release: Dec 3, 2018
  • Latest release: Dec 16, 2019
  • Number of updates: 18
  • Update frequency: every 22.0 days
  • Top authors: bitcoinus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,111 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/woo-payment-gateway-bitcoinus/bitcoinus.php+98
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

Server metrics [RAM: ▼1.90MB] [CPU: ▼53.33ms] Passed 4 tests

Server-side resources used by WooCommerce Payment Gateway - Bitcoinus
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.384.57 ▼38.56
Dashboard /wp-admin2.10 ▼1.205.54 ▼45.08
Posts /wp-admin/edit.php2.10 ▼1.255.44 ▼41.95
Add New Post /wp-admin/post-new.php2.10 ▼3.785.39 ▼87.72
Media Library /wp-admin/upload.php2.10 ▼1.125.88 ▼27.97

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Payment Gateway - Bitcoinus
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.30 ▼0.971.70 ▼0.0443.05 ▼1.68
Dashboard /wp-admin2,206 ▲184.85 ▼1.03103.78 ▼10.6638.20 ▼20.46
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0637.00 ▼0.4732.15 ▼3.38
Add New Post /wp-admin/post-new.php1,533 ▼923.14 ▲5.12657.57 ▲44.5552.94 ▲1.53
Media Library /wp-admin/upload.php1,388 ▲34.21 ▼0.01100.72 ▲3.4349.11 ▲3.99

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/woo-payment-gateway-bitcoinus/bitcoinus.php+98
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: bitcoinus payment gateway, woocommerce, woocommerce bitcoin, payment processing, woocommerce crypto-currency payment

woo-payment-gateway-bitcoinus/bitcoinus.php 92% from 13 tests

The main PHP file in "WooCommerce Payment Gateway - Bitcoinus" ver. 2.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-payment-gateway-bitcoinus.php" instead of "bitcoinus.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin3,818 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
SVG1013,545
PHP24030260
JavaScript14013

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity10.50
▷ Minimum class complexity2.00
▷ Maximum class complexity19.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods15.88%
▷ Public methods1482.35%
▷ Protected methods317.65%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/logo.png1.90KB2.09KB0.00%