89% clover-payments-for-woocommerce

Code Review | Clover Payments for WooCommerce

WordPress plugin Clover Payments for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: clover-payments-f...
  • Plugin version: 1.0.10
  • PHP compatiblity: 7.4 or Higher+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.3
  • WordPress version: 6.3.1
  • First release: May 24, 2022
  • Latest release: Aug 21, 2023
  • Number of updates: 16
  • Update frequency: every 28.8 days
  • Top authors: cloverecommerce (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /11,065 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.02MB] [CPU: ▼2.14ms] Passed 4 tests

Analyzing server-side resources used by Clover Payments for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.88 ▼1.58
Dashboard /wp-admin3.33 ▲0.0251.91 ▲0.88
Posts /wp-admin/edit.php3.38 ▲0.0249.31 ▼0.96
Add New Post /wp-admin/post-new.php5.91 ▲0.0295.53 ▼6.90
Media Library /wp-admin/upload.php3.25 ▲0.0238.25 ▲4.61

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Clover Payments for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6113.28 ▼1.124.51 ▲2.5244.29 ▼0.77
Dashboard /wp-admin2,213 ▲254.84 ▼0.07111.67 ▼6.5643.18 ▲0.45
Posts /wp-admin/edit.php2,096 ▲72.03 ▲0.0436.61 ▲0.6839.21 ▲5.28
Add New Post /wp-admin/post-new.php1,552 ▲3318.38 ▼4.91585.64 ▼102.6255.60 ▲4.76
Media Library /wp-admin/upload.php1,395 ▲44.20 ▲0.0094.85 ▼5.7241.35 ▼2.55

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
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • woocommerce_clover_payments_settings
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Requires php: The plugin version is formatted incorrectly
The official readme.txt might help

clover-payments-for-woocommerce/woo-clover-payments.php 69% from 13 tests

The principal PHP file in "Clover Payments for WooCommerce" v. 1.0.10 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("clover-payments-for-woocommerce.php" instead of "woo-clover-payments.php")
  • Requires PHP: Required version number should only contain digits separated by dots (ex. "7.0" instead of "7.4 or Higher")
  • Requires at least: Required version does not match the one declared in readme.txt ("5.9.3" instead of "5.9")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin1,587 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP71853981,039
JavaScript33428325
PO File1641141
CSS119482

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity19.80
▷ Minimum class complexity2.00
▷ Maximum class complexity40.00
Average method complexity3.19
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits1
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods43
▷ Static methods613.95%
▷ Public methods3376.74%
▷ Protected methods00.00%
▷ Private methods1023.26%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
No PNG files were detected