89% crypto-com-pay-checkout-for-woocommerce

Code Review | Crypto.com Pay Checkout for WooCommerce

WordPress plugin Crypto.com Pay Checkout for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: crypto-com-pay-ch...
  • Plugin version: 1.3.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2
  • WordPress version: 6.3.1
  • First release: Sep 18, 2019
  • Latest release: Apr 29, 2023
  • Number of updates: 47
  • Update frequency: every 28.3 days
  • Top authors: cryptocom (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /21,914 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼10.66ms] Passed 4 tests

A check of server-side resources used by Crypto.com Pay Checkout for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1334.89 ▼9.53
Dashboard /wp-admin3.46 ▲0.1638.10 ▼11.81
Posts /wp-admin/edit.php3.56 ▲0.2144.72 ▲0.50
Add New Post /wp-admin/post-new.php6.14 ▲0.2670.12 ▼21.46
Media Library /wp-admin/upload.php3.40 ▲0.1834.35 ▲0.17

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
crypto_plugin_version
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Crypto.com Pay Checkout for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲7913.31 ▼1.074.12 ▲2.1939.13 ▼5.69
Dashboard /wp-admin2,220 ▲324.88 ▼0.01111.20 ▼2.7742.92 ▼5.37
Posts /wp-admin/edit.php2,105 ▲192.01 ▼0.0440.93 ▲7.0236.14 ▲2.79
Add New Post /wp-admin/post-new.php1,551 ▲3118.25 ▼4.80633.72 ▼7.4350.05 ▼12.25
Media Library /wp-admin/upload.php1,399 ▲144.20 ▼0.08100.40 ▲0.6142.49 ▲0.40

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • crypto_plugin_version
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

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
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 21 tag instead of maximum 10
The official readme.txt is a good inspiration

crypto-com-pay-checkout-for-woocommerce/class-crypto-pay.php 85% from 13 tests

Analyzing the main PHP file in "Crypto.com Pay Checkout for WooCommerce" version 1.3.5
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("crypto-com-pay-checkout-for-woocommerce.php" instead of "class-crypto-pay.php")
  • Requires at least: Required version does not match the one declared in readme.txt ("5.0" instead of "4.5")

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
Good job! No executable or dangerous file extensions detected2,089 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP61592982,016
SVG11130
PO File15527
Markdown110016

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.29
Average class complexity9.50
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity2.42
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods36
▷ Static methods1438.89%
▷ Public methods2158.33%
▷ Protected methods00.00%
▷ Private methods1541.67%
Functions8
▷ Named functions787.50%
▷ Anonymous functions112.50%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin