93% unified-payment-services-limited-payment-gateway-for-woocommerce

Code Review | Unified Payment Services Limited - WooCommerce Gateway

WordPress plugin Unified Payment Services Limited - WooCommerce Gateway scored 93% from 54 tests.

About plugin

  • Plugin page: unified-payment-s...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Oct 3, 2017
  • Latest release: Oct 3, 2017
  • Number of updates: 6
  • Update frequency: every 37.2 days
  • Top authors: oomotayo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 316 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼157.70ms] Passed 4 tests

Analyzing server-side resources used by Unified Payment Services Limited - WooCommerce Gateway
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0139.80 ▲3.27
Dashboard /wp-admin3.07 ▲0.0151.06 ▲2.77
Posts /wp-admin/edit.php3.12 ▲0.0144.94 ▲7.73
Add New Post /wp-admin/post-new.php5.42 ▼0.0187.27 ▼636.19
Media Library /wp-admin/upload.php3.01 ▲0.0132.68 ▼0.64

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Unified Payment Services Limited - WooCommerce Gateway
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲10715.88 ▲0.378.31 ▼0.8949.55 ▼1.58
Dashboard /wp-admin2,973 ▲395.96 ▲0.04149.24 ▲1.98125.52 ▲8.68
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0266.23 ▼3.5690.09 ▼4.46
Add New Post /wp-admin/post-new.php1,683 ▼018.80 ▲0.12389.69 ▲11.71107.31 ▼0.19
Media Library /wp-admin/upload.php1,810 ▲34.99 ▼0.02150.43 ▼9.86116.44 ▼4.62

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 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 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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/unified-payment-services-limited-payment-gateway-for-woocommerce/woocommerce-unified-payment-gateway.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/unified-payment-services-limited-payment-gateway-for-woocommerce/woocommerce-ups.php:2

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, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === unified-payment-services-limited-payment-gateway-for-woocommerce === )
  • Requires at least: Invalid version format
The official readme.txt might help

unified-payment-services-limited-payment-gateway-for-woocommerce/woocommerce-unified-payment-gateway.php 92% from 13 tests

"Unified Payment Services Limited - WooCommerce Gateway" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("unified-payment-services-limited-payment-gateway-for-woocommerce.php" instead of "woocommerce-unified-payment-gateway.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin423 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP279105423

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/creditcard.png5.64KB2.74KB▼ 51.44%
assets/images/ups.png15.73KB6.88KB▼ 56.27%