83% cryptocurrency-product-for-woocommerce

Code Review | Cryptocurrency Product for WooCommerce

WordPress plugin Cryptocurrency Product for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: cryptocurrency-pr...
  • Plugin version: 3.16.11
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Apr 30, 2018
  • Latest release: Nov 20, 2023
  • Number of updates: 154
  • Update frequency: every 13.2 days
  • Top authors: ethereumicoio (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

100+ active /19,546 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Cryptocurrency Product for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.43 ▼3.76
Dashboard /wp-admin3.31 ▲0.0044.82 ▼1.00
Posts /wp-admin/edit.php3.36 ▲0.0044.88 ▼2.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.43 ▼6.88
Media Library /wp-admin/upload.php3.23 ▲0.0031.86 ▲1.31

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 1,377 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Cryptocurrency Product for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲314.69 ▲0.371.72 ▼0.1738.24 ▼5.27
Dashboard /wp-admin2,198 ▲275.59 ▼0.0193.85 ▼7.0938.60 ▼4.28
Posts /wp-admin/edit.php2,100 ▼31.96 ▲0.0038.79 ▼1.1835.63 ▼1.84
Add New Post /wp-admin/post-new.php1,526 ▼1023.38 ▲0.14629.67 ▼53.9555.89 ▼5.59
Media Library /wp-admin/upload.php1,400 ▲34.07 ▼0.1095.01 ▼8.3040.36 ▼3.45

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% 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 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
  • 595× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Crypt\\EC\\Curves\\sect409k1' not found in wp-content/plugins/cryptocurrency-product-for-woocommerce/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/nistk409.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'FG\\ASN1\\ASNObject' not found in wp-content/plugins/cryptocurrency-product-for-woocommerce/vendor/fgrosse/phpasn1/lib/ASN1/AbstractString.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'BitWasp\\Bitcoin\\Collection\\StaticBufferCollection' not found in wp-content/plugins/cryptocurrency-product-for-woocommerce/vendor/olegabr/bitcoin/src/Script/ScriptWitness.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Crypt\\EC\\BaseCurves\\Prime' not found in wp-content/plugins/cryptocurrency-product-for-woocommerce/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Curves/secp384r1.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'BitWasp\\Bitcoin\\Key\\KeyToScript\\Factory\\KeyToScriptDataFactory' not found in wp-content/plugins/cryptocurrency-product-for-woocommerce/vendor/olegabr/bitcoin/src/Key/KeyToScript/Factory/P2wpkhScriptDataFactory.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Web3\\Methods\\EthMethod' not found in wp-content/plugins/cryptocurrency-product-for-woocommerce/vendor/olegabr/web3.php/src/Methods/Eth/Hashrate.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'BitWasp\\Bitcoin\\Serializable' not found in wp-content/plugins/cryptocurrency-product-for-woocommerce/vendor/olegabr/bitcoin/src/Script/Interpreter/Number.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Math\\Common\\FiniteField\\Integer' not found in wp-content/plugins/cryptocurrency-product-for-woocommerce/vendor/phpseclib/phpseclib/phpseclib/Math/BinaryField/Integer.php:37
    • > PHP Fatal error
      Trait 'phpseclib3\\Crypt\\EC\\Formats\\Keys\\Common' not found in wp-content/plugins/cryptocurrency-product-for-woocommerce/vendor/phpseclib/phpseclib/phpseclib/Crypt/EC/Formats/Keys/libsodium.php on line 33
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib3\\Math\\BigInteger\\Engines\\BCMath' not found in wp-content/plugins/cryptocurrency-product-for-woocommerce/vendor/phpseclib/phpseclib/phpseclib/Math/BigInteger/Engines/BCMath/BuiltIn.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
Please take inspiration from this readme.txt

cryptocurrency-product-for-woocommerce/cryptocurrency-product-for-woocommerce.php 85% from 13 tests

The main file in "Cryptocurrency Product for WooCommerce" v. 3.16.11 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:
  • Description: Keep the plugin description shorter than 140 characters (currently 190 characters long)
  • Requires at least: Required version must match the one declared in readme.txt ("4.7" instead of "5.5.0")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected130,725 lines of code in 1,307 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,27627,17370,987126,659
JSON1001,997
PO File34901,0681,562
JavaScript742110296
Markdown225080
SVG11159
XML20049
CSS130013
YAML1007
Bourne Shell1203

PHP code 0% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,096)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 204)
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity13.93
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity204.00
Code structure
Namespaces186
Interfaces107
Traits7
Classes1,045
▷ Abstract classes24723.64%
▷ Concrete classes79876.36%
▷ Final classes506.27%
Methods6,889
▷ Static methods1,19717.38%
▷ Public methods5,59381.19%
▷ Protected methods4536.58%
▷ Private methods84312.24%
Functions659
▷ Named functions38157.81%
▷ Anonymous functions27842.19%
Constants901
▷ Global constants10711.88%
▷ Class constants79488.12%
▷ Public constants78398.61%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
15 PNG files occupy 0.40MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-10.png28.64KB11.34KB▼ 60.39%
assets/screenshot-3.png27.69KB11.26KB▼ 59.35%
assets/screenshot-8.png44.12KB16.49KB▼ 62.64%
assets/icon-256x256.png8.68KB6.70KB▼ 22.87%
vendor/freemius/wordpress-sdk/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%