84% accept-bitcoin-payments-on-woocommerce-thebigcoin

Code Review | Accept CryptoCurrency Payments on WooCommerce – CryptoCurrency Gateway Plugin from TheBigCoin

WordPress plugin Accept CryptoCurrency Payments on WooCommerce – CryptoCurrency Gateway Plugin from TheBigCoin scored 84% from 54 tests.

About plugin

  • Plugin page: accept-bitcoin-pa...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Nov 16, 2017
  • Latest release: Jun 5, 2018
  • Number of updates: 52
  • Update frequency: every 3.9 days
  • Top authors: thebigcoin (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

20+ active / 7,065 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼8.33ms] Passed 4 tests

Analyzing server-side resources used by Accept CryptoCurrency Payments on WooCommerce – CryptoCurrency Gateway Plugin from TheBigCoin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0835.74 ▼4.81
Dashboard /wp-admin3.39 ▲0.0846.33 ▼2.53
Posts /wp-admin/edit.php3.44 ▲0.0849.52 ▼2.69
Add New Post /wp-admin/post-new.php5.97 ▲0.0884.36 ▼23.08
Media Library /wp-admin/upload.php3.31 ▲0.0834.46 ▼2.73

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Accept CryptoCurrency Payments on WooCommerce – CryptoCurrency Gateway Plugin from TheBigCoin
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.22 ▼1.151.74 ▼0.1538.93 ▼6.27
Dashboard /wp-admin2,206 ▲185.80 ▲0.8794.51 ▼10.6538.73 ▼3.74
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0135.34 ▼7.7133.75 ▼0.83
Add New Post /wp-admin/post-new.php1,534 ▲2023.10 ▲5.67675.78 ▲6.3655.77 ▼1.61
Media Library /wp-admin/upload.php1,388 ▲34.12 ▼0.13104.11 ▼10.3749.09 ▲0.70

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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 fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/accept-bitcoin-payments-on-woocommerce-thebigcoin/thebigcoin.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed: You can look at the official readme.txt

accept-bitcoin-payments-on-woocommerce-thebigcoin/thebigcoin.php 92% from 13 tests

The main PHP file in "Accept CryptoCurrency Payments on WooCommerce – CryptoCurrency Gateway Plugin from TheBigCoin" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("accept-bitcoin-payments-on-woocommerce-thebigcoin.php" instead of "thebigcoin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected581 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP37911581

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity45.00
▷ Minimum class complexity20.00
▷ Maximum class complexity70.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods1568.18%
▷ Protected methods313.64%
▷ Private methods418.18%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ 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
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/thebigcoin-button.png3.48KB1.83KB▼ 47.52%