89% squad-payment-gateway

Code Review | WooCommerce Squad Payment Gateway

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

About plugin

  • Plugin page: squad-payment-gat...
  • Plugin version: 1.0.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 30, 2022
  • Latest release: Oct 27, 2022
  • Number of updates: 13
  • Update frequency: every 4.9 days
  • Top authors: squadco (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /2,195 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.00MB] [CPU: ▼9.84ms] Passed 4 tests

A check of server-side resources used by WooCommerce Squad Payment Gateway
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.77 ▼2.23
Dashboard /wp-admin3.31 ▲0.0149.40 ▼6.02
Posts /wp-admin/edit.php3.36 ▲0.0046.94 ▼1.75
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.05 ▼29.34
Media Library /wp-admin/upload.php3.24 ▲0.0040.33 ▲0.58

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

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

Browser metrics Passed 4 tests

WooCommerce Squad Payment Gateway: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.41 ▲0.061.83 ▼0.0341.19 ▼5.15
Dashboard /wp-admin2,195 ▲215.62 ▲0.0187.92 ▼12.1542.11 ▼1.18
Posts /wp-admin/edit.php2,100 ▲31.98 ▼0.0534.29 ▼3.7738.48 ▲1.60
Add New Post /wp-admin/post-new.php1,528 ▼023.08 ▼0.06703.99 ▲9.4660.46 ▲8.94
Media Library /wp-admin/upload.php1,400 ▲34.22 ▲0.03114.53 ▼11.7846.10 ▼3.71

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
  • Screenshots: These screenshots lack descriptions #2, #3 in squad-payment-gateway/assets to your readme.txt
You can look at the official readme.txt

squad-payment-gateway/squad-payment-gateway.php Passed 13 tests

The entry point to "WooCommerce Squad Payment Gateway" version 1.0.8 is a PHP file that has certain tags in its header comment area
57 characters long description:
Provides Seamless Payments with Multiple payment options.

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
No dangerous file extensions were detected795 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3250194706
JavaScript118289

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity47.00
▷ Minimum class complexity9.00
▷ Maximum class complexity85.00
Average method complexity4.54
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods2284.62%
▷ Protected methods311.54%
▷ Private methods13.85%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
4 PNG files occupy 0.47MB with 0.22MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/settings.png236.64KB80.90KB▼ 65.81%
assets/images/logo.png1.71KB1.72KB0.00%
assets/images/inline-modal.png167.22KB69.47KB▼ 58.46%
assets/images/checkout.png74.02KB25.74KB▼ 65.23%