84% speed-accept-bitcoin-payments

Code Review | Speed Bitcoin Payments for WooCommerce

WordPress plugin Speed Bitcoin Payments for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: speed-accept-bitc...
  • Plugin version: 1.0.12
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 20, 2022
  • Latest release: Nov 27, 2023
  • Number of updates: 33
  • Update frequency: every 12.2 days
  • Top authors: speedapp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,449 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.09MB] [CPU: ▲0.12ms] Passed 4 tests

An overview of server-side resources used by Speed Bitcoin Payments for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0937.91 ▼4.05
Dashboard /wp-admin3.39 ▲0.0946.88 ▼1.83
Posts /wp-admin/edit.php3.50 ▲0.1550.02 ▲7.32
Add New Post /wp-admin/post-new.php5.99 ▲0.10100.23 ▲13.44
Media Library /wp-admin/upload.php3.31 ▲0.0833.55 ▼0.96

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Speed Bitcoin Payments for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲5414.67 ▼0.041.71 ▲0.0841.71 ▼2.65
Dashboard /wp-admin2,192 ▲115.65 ▼0.07107.38 ▼4.0857.63 ▲15.36
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.0039.33 ▲3.7636.51 ▼0.94
Add New Post /wp-admin/post-new.php1,535 ▲925.27 ▲2.06641.98 ▼50.4563.14 ▲4.37
Media Library /wp-admin/upload.php1,394 ▼94.28 ▲0.1097.27 ▼1.3140.63 ▼0.22

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 does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/speed-accept-bitcoin-payments/includes/WooCommerce/Speed_Payment_Gateway.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/speed-accept-bitcoin-payments/includes/WooCommerce/views/speed_options.php:2

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: bitcoin payments, bitcoin wordpress, bitcoin, accept bitcoin, e-commerce bitcoin...

speed-accept-bitcoin-payments/speed-accept-bitcoin-payments.php 85% from 13 tests

The main PHP script in "Speed Bitcoin Payments for WooCommerce" version 1.0.12 is automatically included on every request by WordPress
The following require your attention:
  • Requires PHP: The required version number did not match the one declared in readme.txt ("7.4.29" instead of "7.2")
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.0" instead of "5.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,888 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP162234291,083
JavaScript16811500
CSS2501277
Markdown110021
JSON1007

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity13.20
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes110.00%
Methods54
▷ Static methods814.81%
▷ Public methods5194.44%
▷ Protected methods00.00%
▷ Private methods35.56%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants8
▷ Global constants562.50%
▷ Class constants337.50%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
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
assets/images/speed-logo.png4.38KB1.98KB▼ 54.75%