90% yottapay-payment-gateway

Code Review | Yotta Pay Payment Gateway

WordPress plugin Yotta Pay Payment Gateway scored90%from 54 tests.

About plugin

  • Plugin page: yottapay-payment-...
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.4
  • WordPress version: 6.3.1
  • First release: Jan 29, 2022
  • Latest release: Nov 13, 2023
  • Number of updates: 27
  • Update frequency: every 24.2 days
  • Top authors: yottapay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,599 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.16ms] Passed 4 tests

Server-side resources used by Yotta Pay Payment Gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0641.19 ▲3.37
Dashboard /wp-admin3.37 ▲0.0248.39 ▼12.45
Posts /wp-admin/edit.php3.49 ▲0.1348.78 ▲2.29
Add New Post /wp-admin/post-new.php5.96 ▲0.0690.40 ▼18.60
Media Library /wp-admin/upload.php3.30 ▲0.0631.89 ▲0.13

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Yotta Pay Payment Gateway
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲6014.27 ▼0.082.03 ▲0.2445.31 ▲7.47
Dashboard /wp-admin2,205 ▲275.62 ▼0.0990.00 ▼27.0639.88 ▼7.41
Posts /wp-admin/edit.php2,107 ▲71.99 ▼0.0238.31 ▲0.9637.05 ▲2.60
Add New Post /wp-admin/post-new.php1,533 ▲722.70 ▼0.94582.95 ▼99.0445.83 ▼8.31
Media Library /wp-admin/upload.php1,407 ▲44.26 ▲0.05100.64 ▼0.5644.30 ▲0.29

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: payment request, yotta pay, woocommerce, online banking, ecommerce...

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

The main PHP script in "Yotta Pay Payment Gateway" version 2.0.0 is automatically included on every request by WordPress
84 characters long description:
Yotta Pay is the fastest and most secure way to accept payments via UK bank account.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin3,147 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP104894993,035
JavaScript31216112

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity32.88
▷ Minimum class complexity1.00
▷ Maximum class complexity75.00
Average method complexity3.66
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods96
▷ Static methods8285.42%
▷ Public methods5961.46%
▷ Protected methods11.04%
▷ Private methods3637.50%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.09MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon.png0.96KB1.12KB0.00%
assets/logo_mobile_banking.png44.04KB18.33KB▼ 58.37%
assets/icon_white.png2.83KB1.71KB▼ 39.82%
assets/logo_card_payment.png44.26KB18.90KB▼ 57.30%