89% woo-clover-gateway-by-zaytech

Code Review | WooCommerce Clover Payment Gateway

WordPress plugin WooCommerce Clover Payment Gateway scored89%from 54 tests.

About plugin

  • Plugin page: woo-clover-gatewa...
  • Plugin version: 1.3.0
  • PHP compatiblity: 5.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 21, 2019
  • Latest release: Mar 9, 2023
  • Number of updates: 38
  • Update frequency: every 38.9 days
  • Top authors: elbanyaoui (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /17,701 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼10.45ms] Passed 4 tests

A check of server-side resources used by WooCommerce Clover Payment Gateway
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.36 ▼8.77
Dashboard /wp-admin3.31 ▲0.0144.72 ▼10.38
Posts /wp-admin/edit.php3.36 ▲0.0145.21 ▼4.91
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.40 ▼17.74
Media Library /wp-admin/upload.php3.23 ▲0.0034.50 ▲1.67

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Clover Payment Gateway
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9813.23 ▼1.161.84 ▲0.1437.75 ▼11.89
Dashboard /wp-admin2,214 ▲265.86 ▲0.9799.11 ▼13.9637.69 ▼8.18
Posts /wp-admin/edit.php2,096 ▲72.01 ▼0.0235.72 ▲1.1933.85 ▼1.87
Add New Post /wp-admin/post-new.php1,541 ▲823.47 ▼0.30614.87 ▼55.0641.78 ▼6.48
Media Library /wp-admin/upload.php1,396 ▲84.29 ▲0.0797.68 ▼2.5941.60 ▼2.33

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • woocommerce_woocci_zaytech_settings
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3, #4 in woo-clover-gateway-by-zaytech/assets to your readme.txt
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt might help

woo-clover-gateway-by-zaytech/zaytech-woo-commerce-clover-integration.php 77% from 13 tests

"WooCommerce Clover Payment Gateway" version 1.3.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-clover-gateway-by-zaytech.php" instead of "zaytech-woo-commerce-clover-integration.php")
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Requires at least: Required version must match the one declared in readme.txt ("4.7.1" instead of "4.4")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin1,978 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP102834481,484
SVG1809332
PO File17072160
CSS1001
JavaScript1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity24.33
▷ Minimum class complexity1.00
▷ Maximum class complexity62.00
Average method complexity4.18
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods66
▷ Static methods2131.82%
▷ Public methods6192.42%
▷ Protected methods00.00%
▷ Private methods57.58%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants787.50%
▷ Class constants112.50%
▷ 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
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-256x256.png39.47KB11.49KB▼ 70.90%