88% uvibapay

Code Review | WooCommerce Uviba Payments

WordPress plugin WooCommerce Uviba Payments scored 88% from 54 tests.

About plugin

  • Plugin page: uvibapay
  • Plugin version: 1.3.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-5.6
  • WordPress version: 5.8.1
  • First release: Apr 17, 2018
  • Latest release: Dec 4, 2020
  • Number of updates: 27
  • Update frequency: every 35.6 days
  • Top authors: ibrahimhasanov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,343 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
Installer ran successfully

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

A check of server-side resources used by WooCommerce Uviba Payments
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1234.77 ▲14.44
Dashboard /wp-admin3.06 ▲0.0047.58 ▲4.81
Posts /wp-admin/edit.php3.11 ▲0.0036.18 ▼4.48
Add New Post /wp-admin/post-new.php5.42 ▼0.0289.66 ▼554.12
Media Library /wp-admin/upload.php3.00 ▲0.0032.73 ▼3.84

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Uviba Payments
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲12115.93 ▲0.318.61 ▼0.8944.74 ▼2.36
Dashboard /wp-admin2,970 ▲365.88 ▼0.16149.05 ▼12.05104.68 ▼6.78
Posts /wp-admin/edit.php2,739 ▼02.70 ▼0.0066.08 ▼6.0885.61 ▼2.34
Add New Post /wp-admin/post-new.php1,683 ▲6818.53 ▼3.01396.35 ▲101.75108.88 ▲5.29
Media Library /wp-admin/upload.php1,807 ▼35.01 ▼0.02149.73 ▼6.22119.99 ▲4.75

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/uvibapay/index.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/uvibapay/classes/WC_Gateway_CustomWPressPlugin.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/uvibapay/classes/WC_Gateway_UvibaPayment.php:4

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (WooCommerce > Payment Gateway > Uviba Payments - setting page), #2 (Checkout Page - Option of Payment by *Uviba Payments*), #3 (Uviba Payments - Client login page), #4 (Uviba Payments - Payment slection page), #5 (Uviba Payments - Payment processing page), #6 (Return Page - Transaction status as per *Uviba Payments* display on return page as per setting)
Please take inspiration from this readme.txt

uvibapay/index.php 92% from 13 tests

Analyzing the main PHP file in "WooCommerce Uviba Payments" version 1.3.6
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("uvibapay.php" instead of "index.php")

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,281 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP72552291,281

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity37.25
▷ Minimum class complexity7.00
▷ Maximum class complexity65.00
Average method complexity4.15
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods46
▷ Static methods1226.09%
▷ Public methods46100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.82MB with 0.56MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/images/uviba_payment_gateway.png838.83KB260.34KB▼ 68.96%