83% coinbase-commerce

Code Review | Coinbase Commerce Payment Gateway for WooCommerce

WordPress plugin Coinbase Commerce Payment Gateway for WooCommerce scored83%from 54 tests.

About plugin

Code review

54 tests

User reviews

16 reviews

Install metrics

10,000+ active /72,690 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.00ms] Passed 4 tests

Server-side resources used by Coinbase Commerce Payment Gateway for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.0243.47 ▼8.13
Dashboard /wp-admin3.58 ▲0.0256.75 ▲5.59
Posts /wp-admin/edit.php3.70 ▲0.0291.81 ▲40.98
Add New Post /wp-admin/post-new.php6.17 ▲0.0288.53 ▼10.55
Media Library /wp-admin/upload.php3.51 ▲0.0241.99 ▲1.10

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Coinbase Commerce Payment Gateway for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.72 ▲0.161.90 ▲0.0643.02 ▼1.50
Dashboard /wp-admin2,192 ▲155.53 ▼0.16104.69 ▲13.2944.37 ▲4.75
Posts /wp-admin/edit.php2,106 ▲62.03 ▲0.0351.23 ▲13.7241.63 ▲8.03
Add New Post /wp-admin/post-new.php1,526 ▼1417.57 ▼5.55684.09 ▼0.7756.37 ▲1.69
Media Library /wp-admin/upload.php1,400 ▼04.23 ▲0.03101.20 ▼5.3745.14 ▼1.48

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/coinbase-commerce/coinbase-commerce.php:52
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/coinbase-commerce/tests/phpunit/bootstrap.php on line 8
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/coinbase-commerce/tests/phpunit/bootstrap.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/coinbase-commerce/tests/phpunit/test-wc-coinbase.php:3

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

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Requires php: Invalid version format
You can look at the official readme.txt

coinbase-commerce/coinbase-commerce.php 77% from 13 tests

The main file in "Coinbase Commerce Payment Gateway for WooCommerce" v. 1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.0" instead of "3.0.9")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin772 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP5158290582
Bourne Shell122796
Markdown151177
XML10017

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity19.00
▷ Minimum class complexity7.00
▷ Maximum class complexity32.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods23
▷ Static methods521.74%
▷ Public methods2086.96%
▷ Protected methods313.04%
▷ Private methods00.00%
Functions15
▷ Named functions1493.33%
▷ Anonymous functions16.67%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.07MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/bitcoin.png16.21KB1.34KB▼ 91.71%
assets/images/bitcoincash.png16.25KB1.32KB▼ 91.86%
assets/images/ethereum.png16.16KB1.31KB▼ 91.89%
assets/images/usdc.png5.32KB2.74KB▼ 48.45%
assets/images/litecoin.png15.76KB1.01KB▼ 93.57%