62% cryptopay-wc-lite

Code Review | WooCommerce Cryptocurrency Payment Gateway for WordPress by CryptoPay

WordPress plugin WooCommerce Cryptocurrency Payment Gateway for WordPress by CryptoPay scored62%from 54 tests.

About plugin

  • Plugin page: cryptopay-wc-lite
  • Plugin version: 1.6.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 2, 2021
  • Latest release: Oct 4, 2023
  • Number of updates: 73
  • Update frequency: every 10.0 days
  • Top authors: beycandeveloper (52.05%)beycanpress (49.32%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /8,979 total downloads

Benchmarks

Plugin footprint 65% 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: ▲1.89MB] [CPU: ▲13.72ms] Passed 4 tests

A check of server-side resources used by WooCommerce Cryptocurrency Payment Gateway for WordPress by CryptoPay
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /5.24 ▲1.7854.30 ▲15.61
Dashboard /wp-admin5.26 ▲1.9660.16 ▲14.20
Posts /wp-admin/edit.php5.31 ▲1.9667.77 ▲21.75
Add New Post /wp-admin/post-new.php7.80 ▲1.9196.68 ▲3.31
Media Library /wp-admin/upload.php5.12 ▲1.9057.05 ▲23.15
Settings /wp-admin/admin.php?page=cryptopay_lite_settings5.1949.49
Buy premium /wp-admin/admin.php?page=cryptopay_lite_home5.1245.58

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 1,723 new files
Database: 1 new table, 10 new options
New tables
wp_cpl_order_transaction
New WordPress options
widget_theysaidso_widget
cryptopay_premium_version_promotion
cryptopay_premium_version_promotion_date
wp_cpl_order_transaction_version
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
cryptopay_lite_settings
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Cryptocurrency Payment Gateway for WordPress by CryptoPay
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲94924.00 ▲9.6257.20 ▲55.4328.79 ▼10.90
Dashboard /wp-admin2,222 ▲344.92 ▼0.96110.70 ▲3.0376.74 ▲33.07
Posts /wp-admin/edit.php2,117 ▲251.98 ▼0.0235.81 ▼3.9533.20 ▼1.53
Add New Post /wp-admin/post-new.php1,547 ▲3323.16 ▲5.56765.15 ▲161.7752.20 ▼12.67
Media Library /wp-admin/upload.php1,416 ▲284.16 ▼0.04123.90 ▲22.1951.05 ▲6.85
Settings /wp-admin/admin.php?page=cryptopay_lite_settings1,4323.7765.8584.51
Buy premium /wp-admin/admin.php?page=cryptopay_lite_home1,6199.42254.3858.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_cpl_order_transaction
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • wp_cpl_order_transaction_version
    • theysaidso_admin_options
    • db_upgraded
    • cryptopay_lite_settings
    • cryptopay_premium_version_promotion_date
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • cryptopay_premium_version_promotion
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 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
Please fix the following items
  • 6× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/cryptopay-wc-lite/app/PluginHero/Templates/log.php
    • > /wp-content/plugins/cryptopay-wc-lite/vendor/web3p/web3.php/docker/php/composer-setup.php
    • > /wp-content/plugins/cryptopay-wc-lite/vendor/beycanpress/wp-table/src/Table.php
    • > /wp-content/plugins/cryptopay-wc-lite/vendor/beycanpress/request/api.php
    • > /wp-content/plugins/cryptopay-wc-lite/views/checkout.php
    • > /wp-content/plugins/cryptopay-wc-lite/views/feedback.php
  • 283× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/cryptopay-wc-lite/views/pages/transaction-page/form.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Test\\TestCase' not found in wp-content/plugins/cryptopay-wc-lite/vendor/web3p/web3.php/test/unit/BooleanFormatterTest.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Web3\\Methods\\EthMethod' not found in wp-content/plugins/cryptopay-wc-lite/vendor/web3p/web3.php/src/Methods/Eth/Accounts.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Client\\ClientExceptionInterface' not found in wp-content/plugins/cryptopay-wc-lite/vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib\\Crypt\\Base' not found in wp-content/plugins/cryptopay-wc-lite/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC4.php:54
    • > PHP Fatal error
      Uncaught Error: Interface 'Web3\\Formatters\\IFormatter' not found in wp-content/plugins/cryptopay-wc-lite/vendor/web3p/web3.php/src/Formatters/TransactionFormatter.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Web3\\Methods\\EthMethod' not found in wp-content/plugins/cryptopay-wc-lite/vendor/web3p/web3.php/src/Methods/Eth/Hashrate.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Web3\\Methods\\EthMethod' not found in wp-content/plugins/cryptopay-wc-lite/vendor/web3p/web3.php/src/Methods/Net/PeerCount.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Client\\ClientExceptionInterface' not found in wp-content/plugins/cryptopay-wc-lite/vendor/psr/http-client/src/NetworkExceptionInterface.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Web3\\Contracts\\SolidityType' not found in wp-content/plugins/cryptopay-wc-lite/vendor/web3p/web3.php/src/Contracts/Types/Integer.php:20

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=cryptopay_lite_home
    • > Other (warning) in unknown
    /wp-admin/admin.php?page=cryptopay_lite_home 161 Unrecognized feature: 'web-share'.

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 19 tag instead of maximum 10
You can look at the official readme.txt

cryptopay-wc-lite/index.php 85% from 13 tests

"WooCommerce Cryptocurrency Payment Gateway for WordPress by CryptoPay" version 1.6.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cryptopay-wc-lite.php" instead of "index.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected185,733 lines of code in 1,537 files:
LanguageFilesBlank linesComment linesLines of code
PHP56115,40830,08778,387
SVG8047979759,317
CSS111,3921,28412,869
JavaScript142,55987210,615
Sass221,43238,055
PO File213,3583,7716,824
Markdown371,89605,162
JSON431004,026
YAML11690276
XML6120127
Solidity29032
Python18517
Bourne Shell15010
make13010
Dockerfile1405
HTML1001

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 109)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity21.07
▷ Minimum class complexity1.00
▷ Maximum class complexity644.00
Average method complexity4.26
▷ Minimum method complexity1.00
▷ Maximum method complexity109.00
Code structure
Namespaces62
Interfaces33
Traits6
Classes476
▷ Abstract classes122.52%
▷ Concrete classes46497.48%
▷ Final classes5110.99%
Methods3,265
▷ Static methods42813.11%
▷ Public methods3,03893.05%
▷ Protected methods431.32%
▷ Private methods1845.64%
Functions486
▷ Named functions16734.36%
▷ Anonymous functions31965.64%
Constants289
▷ Global constants3512.11%
▷ Class constants25487.89%
▷ Public constants22387.80%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
12 PNG files occupy 0.18MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/menu.png1.97KB1.72KB▼ 12.51%
assets/images/wallets/binancewallet.png5.24KB5.21KB▼ 0.58%
vendor/beycanpress/csf/assets/images/checkerboard.png2.29KB2.54KB0.00%
assets/images/wallets/trustwallet.png8.38KB5.17KB▼ 38.28%
assets/images/wallets/walletconnect.png10.49KB4.10KB▼ 60.95%