84% woo-2checkout

Code Review | Payment Gateway - 2Checkout for WooCommerce

WordPress plugin Payment Gateway - 2Checkout for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: woo-2checkout
  • Plugin version: 2.0.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.8
  • WordPress version: 6.3.1
  • First release: May 4, 2018
  • Latest release: Aug 23, 2021
  • Number of updates: 23
  • Update frequency: every 52.5 days
  • Top authors: EmranAhmed (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /21,897 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.90ms] Passed 4 tests

An overview of server-side resources used by Payment Gateway - 2Checkout for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.97 ▼0.60
Dashboard /wp-admin3.35 ▲0.0145.03 ▼12.45
Posts /wp-admin/edit.php3.46 ▲0.1145.67 ▼0.39
Add New Post /wp-admin/post-new.php5.93 ▲0.0588.07 ▼10.16
Media Library /wp-admin/upload.php3.27 ▲0.0436.51 ▲0.28

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Payment Gateway - 2Checkout for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6313.54 ▼1.211.88 ▲0.1846.13 ▲4.95
Dashboard /wp-admin2,218 ▲274.87 ▲0.00109.90 ▲2.9044.70 ▼1.01
Posts /wp-admin/edit.php2,097 ▲82.04 ▲0.0439.77 ▼0.8436.24 ▼1.06
Add New Post /wp-admin/post-new.php1,542 ▲1522.75 ▼0.40634.89 ▼9.7255.05 ▲6.56
Media Library /wp-admin/upload.php1,400 ▲124.22 ▲0.03100.14 ▲5.2143.28 ▲0.77

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/woo-2checkout/includes/functions.php
    • > /wp-content/plugins/woo-2checkout/includes/class-woo-2checkout-gateway-api.php
    • > /wp-content/plugins/woo-2checkout/includes/class-woo-2checkout-gateway.php
    • > /wp-content/plugins/woo-2checkout/woo-2checkout.php

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: 2checkout, woocommerce payment gateway, 2checkout payment gateway, payment gateway, 2checkout for woocommerce

woo-2checkout/woo-2checkout.php Passed 13 tests

The main PHP script in "Payment Gateway - 2Checkout for WooCommerce" version 2.0.7 is automatically included on every request by WordPress
68 characters long description:
2Checkout Payment Gateway for WooCommerce. Requires WooCommerce 5.5+

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,622 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP43131041,042
SVG202580

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity42.67
▷ Minimum class complexity13.00
▷ Maximum class complexity99.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods74
▷ Static methods45.41%
▷ Public methods7297.30%
▷ Protected methods11.35%
▷ Private methods11.35%
Functions5
▷ Named functions120.00%
▷ Anonymous functions480.00%
Constants15
▷ Global constants1173.33%
▷ Class constants426.67%
▷ Public constants4100.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
There are no PNG files in this plugin