84% coingate-for-woocommerce

Code Review | WooCommerce Crypto Payment Processor

WordPress plugin WooCommerce Crypto Payment Processor scored84%from 54 tests.

About plugin

  • Plugin page: coingate-for-wooc...
  • Plugin version: 2.1.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.0
  • WordPress version: 6.3.1
  • First release: Jun 29, 2015
  • Latest release: Nov 21, 2022
  • Number of updates: 88
  • Update frequency: every 30.7 days
  • Top authors: coingate (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

600+ active /38,454 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by WooCommerce Crypto Payment Processor
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1042.94 ▲3.62
Dashboard /wp-admin3.39 ▲0.0550.96 ▼13.93
Posts /wp-admin/edit.php3.51 ▲0.1546.55 ▲0.91
Add New Post /wp-admin/post-new.php5.98 ▲0.0985.70 ▼10.70
Media Library /wp-admin/upload.php3.32 ▲0.0936.63 ▲1.49

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 75 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Crypto Payment Processor
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.35 ▲0.001.56 ▼0.1544.06 ▲0.68
Dashboard /wp-admin2,198 ▲215.59 ▲0.0794.44 ▲10.0842.84 ▲5.13
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0735.08 ▼2.7431.70 ▼3.15
Add New Post /wp-admin/post-new.php1,526 ▼922.99 ▲4.73660.65 ▲66.2160.73 ▼10.99
Media Library /wp-admin/upload.php1,403 ▼04.18 ▼0.0894.84 ▼4.5542.41 ▼1.32

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following items
  • 25× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CoinGate\\Exception\\ApiErrorException' not found in wp-content/plugins/coingate-for-woocommerce/vendor/coingate/coingate-php/lib/Exception/Api/BadAuthToken.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'CoinGate\\HttpClient\\ClientInterface' not found in wp-content/plugins/coingate-for-woocommerce/vendor/coingate/coingate-php/lib/HttpClient/CurlClient.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'CoinGate\\Exception\\ApiErrorException' not found in wp-content/plugins/coingate-for-woocommerce/vendor/coingate/coingate-php/lib/Exception/UnknownApiErrorException.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'CoinGate\\Resources\\Order' not found in wp-content/plugins/coingate-for-woocommerce/vendor/coingate/coingate-php/lib/Resources/Checkout.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CoinGate\\Exception\\ApiErrorException' not found in wp-content/plugins/coingate-for-woocommerce/vendor/coingate/coingate-php/lib/Exception/InternalServerError.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/coingate-for-woocommerce/vendor/coingate/coingate-php/tests/TestCase.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'CoinGate\\Exception\\ApiErrorException' not found in wp-content/plugins/coingate-for-woocommerce/vendor/coingate/coingate-php/lib/Exception/Api/BadRequest.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'CoinGate\\Exception\\ApiErrorException' not found in wp-content/plugins/coingate-for-woocommerce/vendor/coingate/coingate-php/lib/Exception/Api/Unauthorized.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'CoinGate\\Exception\\ApiErrorException' not found in wp-content/plugins/coingate-for-woocommerce/vendor/coingate/coingate-php/lib/Exception/Api/OrderIsNotValid.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'CoinGate\\TestCase' not found in wp-content/plugins/coingate-for-woocommerce/vendor/coingate/coingate-php/tests/CoinGate/HttpClient/CurlClientTest.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: Too many tags (19 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

coingate-for-woocommerce/coingate-for-woocommerce.php Passed 13 tests

The principal PHP file in "WooCommerce Crypto Payment Processor" v. 2.1.1 is loaded by WordPress automatically on each request
79 characters long description:
Accept Bitcoin and 70+ Cryptocurrencies via CoinGate in your WooCommerce store.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin2,416 lines of code in 64 files:
LanguageFilesBlank linesComment linesLines of code
PHP566561,2221,994
Markdown4990239
JSON310159
Bourne Shell111224

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity5.27
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.23
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces8
Interfaces2
Traits0
Classes42
▷ Abstract classes24.76%
▷ Concrete classes4095.24%
▷ Final classes00.00%
Methods157
▷ Static methods2415.29%
▷ Public methods13082.80%
▷ Protected methods127.64%
▷ Private methods159.55%
Functions8
▷ Named functions450.00%
▷ Anonymous functions450.00%
Constants10
▷ Global constants220.00%
▷ Class constants880.00%
▷ Public constants8100.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/bitcoin.png3.06KB2.06KB▼ 32.77%