90% robokassa-payment-gateway-saphali

Code Review | Robokassa Payment Gateway (Saphali)

WordPress plugin Robokassa Payment Gateway (Saphali) scored90%from 54 tests.

About plugin

  • Plugin page: robokassa-payment...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5
  • WordPress version: 6.3.1
  • First release: Apr 17, 2015
  • Latest release: Jul 10, 2016
  • Number of updates: 26
  • Update frequency: every 17.4 days
  • Top authors: Saphali (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /12,333 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
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▲0.24ms] Passed 4 tests

Analyzing server-side resources used by Robokassa Payment Gateway (Saphali)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.32 ▼0.97
Dashboard /wp-admin3.37 ▲0.0648.41 ▼3.10
Posts /wp-admin/edit.php3.42 ▲0.0649.88 ▲4.52
Add New Post /wp-admin/post-new.php5.95 ▲0.0694.03 ▲0.52
Media Library /wp-admin/upload.php3.29 ▲0.0640.43 ▲5.28

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Robokassa Payment Gateway (Saphali)
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.021.78 ▼0.0448.85 ▲2.56
Dashboard /wp-admin2,195 ▲185.59 ▼0.0192.24 ▼6.4542.05 ▼3.77
Posts /wp-admin/edit.php2,100 ▼31.94 ▼0.0941.52 ▲6.5935.84 ▼2.45
Add New Post /wp-admin/post-new.php1,526 ▼223.11 ▼0.06655.60 ▼0.1557.58 ▲2.17
Media Library /wp-admin/upload.php1,397 ▼64.18 ▲0.0298.72 ▼5.5343.55 ▼3.62

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 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)
Everything seems fine, however this is by no means an exhaustive test

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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: payment getaway, robokassa, woo commerce, ecommerce, woocommerce

robokassa-payment-gateway-saphali/wc-robokassa.php 92% from 13 tests

The main file in "Robokassa Payment Gateway (Saphali)" v. 1.0.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("robokassa-payment-gateway-saphali.php" instead of "wc-robokassa.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
There were no executable files found in this plugin557 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PO File3102104284
PHP15164273

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity3.58
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
robokassa.png11.89KB4.09KB▼ 65.56%