83% woo-cryptobillings-gateway

Code Review | WooCommerce Crypto Billings Payment Gateway

WordPress plugin WooCommerce Crypto Billings Payment Gateway scored83%from 54 tests.

About plugin

  • Plugin page: woo-cryptobilling...
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.6.2
  • WordPress version: 6.3.1
  • First release: Nov 7, 2018
  • Latest release: Mar 4, 2021
  • Number of updates: 11
  • Update frequency: every 77.3 days
  • Top authors: cryptobillings (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /6,712 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by WooCommerce Crypto Billings Payment Gateway
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.44 ▼4.60
Dashboard /wp-admin3.31 ▲0.0151.88 ▼0.80
Posts /wp-admin/edit.php3.36 ▲0.0049.78 ▼1.23
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.11 ▲0.10
Media Library /wp-admin/upload.php3.23 ▲0.0033.99 ▼0.54

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 138 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

WooCommerce Crypto Billings Payment Gateway: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3514.35 ▼0.261.82 ▲0.1142.98 ▼3.86
Dashboard /wp-admin2,196 ▲165.64 ▼0.0396.06 ▼2.7843.75 ▲0.64
Posts /wp-admin/edit.php2,107 ▲72.02 ▲0.0040.42 ▲4.7437.39 ▲1.68
Add New Post /wp-admin/post-new.php1,533 ▲723.28 ▼0.22608.79 ▼15.7154.83 ▲3.33
Media Library /wp-admin/upload.php1,407 ▲44.20 ▼0.11100.94 ▼4.4543.85 ▼1.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% 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
The following issues need your attention
  • 42× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/woo-cryptobillings-gateway/lib/vendor/guzzlehttp/psr7/src/Stream.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/woo-cryptobillings-gateway/lib/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/woo-cryptobillings-gateway/lib/vendor/guzzlehttp/psr7/src/Request.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/woo-cryptobillings-gateway/lib/vendor/guzzlehttp/psr7/src/NoSeekStream.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/woo-cryptobillings-gateway/lib/vendor/guzzlehttp/psr7/src/InflateStream.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Psr7\\Request' not found in wp-content/plugins/woo-cryptobillings-gateway/lib/vendor/guzzlehttp/psr7/src/ServerRequest.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UriInterface' not found in wp-content/plugins/woo-cryptobillings-gateway/lib/vendor/guzzlehttp/psr7/src/Uri.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UploadedFileInterface' not found in wp-content/plugins/woo-cryptobillings-gateway/lib/vendor/guzzlehttp/psr7/src/UploadedFile.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/woo-cryptobillings-gateway/lib/vendor/psr/http-message/src/ServerRequestInterface.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/woo-cryptobillings-gateway/lib/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php:9

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
You can take inspiration from this readme.txt

woo-cryptobillings-gateway/woocommerce-cryptobillings-gateway.php 85% from 13 tests

The main file in "WooCommerce Crypto Billings Payment Gateway" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-cryptobillings-gateway.php" instead of "woocommerce-cryptobillings-gateway.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin12,505 lines of code in 120 files:
LanguageFilesBlank linesComment linesLines of code
PHP1001,7945,0118,779
Markdown1094303,177
JSON700470
CSS114063
make1409
JavaScript1307

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity13.49
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces9
Interfaces14
Traits2
Classes71
▷ Abstract classes00.00%
▷ Concrete classes71100.00%
▷ Final classes79.86%
Methods674
▷ Static methods6810.09%
▷ Public methods55982.94%
▷ Protected methods60.89%
▷ Private methods10916.17%
Functions143
▷ Named functions5639.16%
▷ Anonymous functions8760.84%
Constants68
▷ Global constants710.29%
▷ Class constants6189.71%
▷ Public constants61100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
10 PNG files occupy 0.19MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/coins/DASH.png0.73KB0.86KB0.00%
assets/images/coins/BCH.png3.86KB2.38KB▼ 38.37%
assets/images/coins/LTC.png8.42KB4.06KB▼ 51.72%
assets/images/coins/DOPE.png10.68KB4.08KB▼ 61.77%
assets/images/accepted-coin-banners/dopecoin-accepted.png112.17KB30.78KB▼ 72.56%