89% cart-gateway

Code Review | CartGateway Payment Gateway for WooCommerce

WordPress plugin CartGateway Payment Gateway for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: cart-gateway
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 5, 2022
  • Latest release: Dec 5, 2022
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: cartgateway (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /513 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
Installer ran successfully

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

A check of server-side resources used by CartGateway Payment Gateway for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0140.08 ▼10.07
Dashboard /wp-admin3.32 ▲0.0249.83 ▼0.93
Posts /wp-admin/edit.php3.37 ▲0.0153.73 ▲0.51
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.45 ▼1.98
Media Library /wp-admin/upload.php3.24 ▲0.0138.48 ▼0.99

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

CartGateway Payment Gateway for WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲914.72 ▲0.771.79 ▼0.2444.38 ▼1.30
Dashboard /wp-admin2,198 ▲185.47 ▼0.1982.72 ▼17.5540.99 ▼2.66
Posts /wp-admin/edit.php2,106 ▲61.96 ▼0.0140.34 ▲1.6137.51 ▲2.22
Add New Post /wp-admin/post-new.php1,534 ▲623.17 ▼0.05665.89 ▼23.3949.14 ▼27.40
Media Library /wp-admin/upload.php1,403 ▲64.22 ▼0.0499.14 ▼7.8945.57 ▼0.13

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: payment gateway, cartgateway, cartgateway plugin, woocommerce payment gateway, cartgateway payment...

cart-gateway/cart_gateway.php 85% from 13 tests

The principal PHP file in "CartGateway Payment Gateway for WooCommerce" v. 1.0.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 392 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cart-gateway.php" instead of "cart_gateway.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin597 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP392209556
Markdown122038
CSS1003

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity20.33
▷ Minimum class complexity4.00
▷ Maximum class complexity48.00
Average method complexity2.66
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods35
▷ Static methods514.29%
▷ Public methods3188.57%
▷ Protected methods12.86%
▷ Private methods38.57%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/jcb.png1.05KB0.76KB▼ 27.31%
assets/img/amex.png2.19KB1.75KB▼ 20.33%
assets/img/dinersclub.png1.27KB1.17KB▼ 8.22%
assets/img/visa.png1.25KB1.29KB0.00%
assets/img/cart_gateway.png9.46KB2.22KB▼ 76.59%