72% mycryptocheckout

Code Review | MyCryptoCheckout - Bitcoin, Ethereum, and 100+ altcoins for WooCommerce

WordPress plugin MyCryptoCheckout - Bitcoin, Ethereum, and 100+ altcoins for WooCommerce scored72%from 54 tests.

About plugin

  • Plugin page: mycryptocheckout
  • Plugin version: 2.129
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.4
  • WordPress version: 6.3.1
  • First release: Jan 11, 2018
  • Latest release: Nov 13, 2023
  • Number of updates: 361
  • Update frequency: every 5.9 days
  • Top authors: edward_plainview (100%)

Code review

54 tests

User reviews

27 reviews

Install metrics

5,000+ active /142,674 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▼4.05ms] Passed 4 tests

Server-side resources used by MyCryptoCheckout - Bitcoin, Ethereum, and 100+ altcoins for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2238.51 ▼3.72
Dashboard /wp-admin3.51 ▲0.2149.37 ▼1.45
Posts /wp-admin/edit.php3.63 ▲0.2746.25 ▲0.49
Add New Post /wp-admin/post-new.php6.10 ▲0.2180.28 ▼11.53
Media Library /wp-admin/upload.php3.44 ▲0.2138.34 ▲3.05
MyCryptoCheckout /wp-admin/options-general.php?page=mycryptocheckout3.8237.93

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 1,206 new files
Database: no new tables, 14 new options
New WordPress options
MyCryptoCheckout_markup_percent
MyCryptoCheckout_markup_amount
MyCryptoCheckout_qr_code_enabled
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
MyCryptoCheckout_qr_code_html
widget_recent-comments
MyCryptoCheckout_payment_timer_html
...

Browser metrics Passed 4 tests

Checking browser requirements for MyCryptoCheckout - Bitcoin, Ethereum, and 100+ altcoins for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3414.71 ▲0.501.85 ▲0.2043.83 ▲1.23
Dashboard /wp-admin2,201 ▲215.78 ▲0.1588.08 ▼5.0838.66 ▼3.71
Posts /wp-admin/edit.php2,106 ▲62.30 ▲0.2836.44 ▲1.9433.92 ▼4.33
Add New Post /wp-admin/post-new.php1,531 ▲523.01 ▼0.41588.64 ▼119.8154.62 ▼4.84
Media Library /wp-admin/upload.php1,406 ▲34.39 ▲0.21104.66 ▲3.5244.29 ▼1.02
MyCryptoCheckout /wp-admin/options-general.php?page=mycryptocheckout8031.9327.9723.78

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
  • Zombie WordPress options were found after uninstall: 14 options
    • MyCryptoCheckout_payment_timer_enabled
    • db_upgraded
    • MyCryptoCheckout_markup_amount
    • MyCryptoCheckout_qr_code_enabled
    • widget_recent-comments
    • can_compress_scripts
    • MyCryptoCheckout_qr_code_html
    • theysaidso_admin_options
    • MyCryptoCheckout_payment_timer_html
    • widget_recent-posts
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=mycryptocheckout
    • > Warning in wp-content/plugins/mycryptocheckout/vendor/mycryptocheckout/api/src/v2/Account.php+47
    gzuncompress(): data error

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/mycryptocheckout/vendor/mdanter/ecc/tests/bootstrap.php
  • 539× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'BitWasp\\Bitcoin\etwork\etwork' not found in wp-content/plugins/mycryptocheckout/vendor/bitwasp/bitcoin/src/Network/Networks/Bitcoin.php:8
    • > PHP Warning
      include(wp-content/plugins/mycryptocheckout/vendor/mdanter/ecc/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/mycryptocheckout/vendor/mdanter/ecc/tests/bootstrap.php on line 19
    • > PHP Fatal error
      Uncaught Error: Class 'plainview\\sdk_mcc\\form2\\tests\\TestCase' not found in wp-content/plugins/mycryptocheckout/vendor/plainview/sdk/form2/tests/DescriptionTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'BitWasp\\Bitcoin\\Key\\KeyToScript\\ScriptDataFactory' not found in wp-content/plugins/mycryptocheckout/vendor/bitwasp/bitcoin/src/Key/KeyToScript/Factory/KeyToScriptDataFactory.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'BitWasp\\Bitcoin\\Crypto\\EcAdapter\\Adapter\\EcAdapterInterface' not found in wp-content/plugins/mycryptocheckout/vendor/bitwasp/bitcoin/src/Crypto/EcAdapter/Impl/Secp256k1/Adapter/EcAdapter.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'plainview\\sdk_mcc\\tests\\TestCase' not found in wp-content/plugins/mycryptocheckout/vendor/plainview/sdk/tests/BaseTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'FG\\ASN1\\AbstractString' not found in wp-content/plugins/mycryptocheckout/vendor/fgrosse/phpasn1/lib/ASN1/Universal/GeneralString.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'BitWasp\\Bitcoin\\Key\\KeyToScript\\Factory\\KeyToScriptDataFactory' not found in wp-content/plugins/mycryptocheckout/vendor/bitwasp/bitcoin/src/Key/KeyToScript/Factory/P2wpkhScriptDataFactory.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'mycryptocheckout\\actions\\action' not found in wp-content/plugins/mycryptocheckout/src/actions/woocommerce_create_order.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'BitWasp\\Bitcoin\\Transaction\\SignatureHash\\SigHash' not found in wp-content/plugins/mycryptocheckout/vendor/bitwasp/bitcoin/src/Transaction/SignatureHash/Hasher.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

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: ethereum, woocommerce, bitcoin woocommerce, bitcoin, payments

mycryptocheckout/MyCryptoCheckout.php 92% from 13 tests

"MyCryptoCheckout - Bitcoin, Ethereum, and 100+ altcoins for WooCommerce" version 2.129's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("mycryptocheckout.php" instead of "MyCryptoCheckout.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected85,284 lines of code in 1,151 files:
LanguageFilesBlank linesComment linesLines of code
PHP93110,95523,18045,366
JSON210011,417
YAML211351149,235
JavaScript182,9584,4058,554
SVG8129413,877
CSS165222,206
Markdown2962201,376
Sass818341,011
C1241132982
Bourne Shell259320555
C/C++ Header22327173
XML670145
Dockerfile1110142
PO File1404398
make224072
m419339
Ant26036

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 204)
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity5.85
▷ Minimum class complexity1.00
▷ Maximum class complexity266.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity204.00
Code structure
Namespaces188
Interfaces67
Traits60
Classes610
▷ Abstract classes325.25%
▷ Concrete classes57894.75%
▷ Final classes00.00%
Methods3,791
▷ Static methods3729.81%
▷ Public methods3,58294.49%
▷ Protected methods822.16%
▷ Private methods1273.35%
Functions154
▷ Named functions6038.96%
▷ Anonymous functions9461.04%
Constants378
▷ Global constants277.14%
▷ Class constants35192.86%
▷ Public constants351100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
src/static/images/currencies/KDU.png29.35KB12.99KB▼ 55.76%