89% coinpayments-payment-gateway-for-woocommerce

Code Review | CoinPayments.net Payment Gateway for WooCommerce

WordPress plugin CoinPayments.net Payment Gateway for WooCommerce scored 89% from 54 tests.

About plugin

  • Plugin page: coinpayments-paym...
  • Plugin version: 1.0.15
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Jan 22, 2014
  • Latest release: Jun 4, 2023
  • Number of updates: 25
  • Update frequency: every 136.8 days
  • Top authors: CoinPayments (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

3,000+ active / 48,061 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.42ms] Passed 4 tests

Analyzing server-side resources used by CoinPayments.net Payment Gateway for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0138.37 ▼4.35
Dashboard /wp-admin3.31 ▲0.0145.60 ▼1.01
Posts /wp-admin/edit.php3.36 ▲0.0049.41 ▼1.97
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.87 ▼18.35
Media Library /wp-admin/upload.php3.23 ▲0.0035.93 ▲1.47

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for CoinPayments.net Payment Gateway for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.22 ▼1.561.68 ▼0.2341.54 ▼9.29
Dashboard /wp-admin2,206 ▲185.83 ▲0.9596.85 ▼9.6440.89 ▼0.48
Posts /wp-admin/edit.php2,089 ▼02.05 ▼0.0139.74 ▼2.8434.10 ▼2.39
Add New Post /wp-admin/post-new.php1,533 ▼123.29 ▲0.24660.30 ▲0.1356.71 ▼4.82
Media Library /wp-admin/upload.php1,388 ▼04.22 ▲0.0096.71 ▼14.3043.80 ▼3.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 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 Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
The official readme.txt is a good inspiration

coinpayments-payment-gateway-for-woocommerce/class-wc-gateway-coinpayments.php 92% from 13 tests

The entry point to "CoinPayments.net Payment Gateway for WooCommerce" version 1.0.15 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("coinpayments-payment-gateway-for-woocommerce.php" instead of "class-wc-gateway-coinpayments.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
There were no executable files found in this plugin349 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP177117349

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity29.00
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity5.31
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
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/icons/coinpayments.png4.69KB2.72KB▼ 41.93%