83% wc-robokassa

Code Review | Payment gateway - Robokassa for WooCommerce

WordPress plugin Payment gateway - Robokassa for WooCommerce scored 83% from 54 tests.

About plugin

  • Plugin page: wc-robokassa
  • Plugin version: 4.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.7
  • WordPress version: 6.3.1
  • First release: Jan 12, 2016
  • Latest release: Apr 2, 2021
  • Number of updates: 58
  • Update frequency: every 32.9 days
  • Top authors: Mofsy (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

600+ active / 25,676 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼4.98ms] Passed 4 tests

An overview of server-side resources used by Payment gateway - Robokassa for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.1043.44 ▲3.63
Dashboard /wp-admin3.40 ▲0.1046.32 ▼1.10
Posts /wp-admin/edit.php3.45 ▲0.1045.55 ▼4.05
Add New Post /wp-admin/post-new.php5.92 ▲0.0484.77 ▼18.38
Media Library /wp-admin/upload.php3.26 ▲0.0339.21 ▲5.98

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 81 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Payment gateway - Robokassa for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.60 ▼0.822.36 ▲0.6843.26 ▲1.18
Dashboard /wp-admin2,209 ▲184.84 ▼1.0697.15 ▼5.2940.02 ▲0.76
Posts /wp-admin/edit.php2,089 ▼32.03 ▲0.0135.72 ▼11.9533.33 ▼7.52
Add New Post /wp-admin/post-new.php1,535 ▲223.51 ▲0.18653.37 ▲47.2852.51 ▲0.90
Media Library /wp-admin/upload.php1,385 ▼04.09 ▼0.1197.63 ▲0.7441.26 ▼0.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Interface 'Interface_Tecodes_Local_Storage_Code' not found in wp-content/plugins/wc-robokassa/vendors/tecodes/tecodes-local/storage/class-tecodes-local-storage-code.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Interface_Tecodes_Local_Http' not found in wp-content/plugins/wc-robokassa/vendors/tecodes/tecodes-local/class-tecodes-local-http.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Interface_Tecodes_Local' not found in wp-content/plugins/wc-robokassa/vendors/tecodes/tecodes-local/class-tecodes-local.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add descriptions for screenshots #7, #8 in wc-robokassa/assets to your readme.txt
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

wc-robokassa/wc-robokassa.php 92% from 13 tests

The primary PHP file in "Payment gateway - Robokassa for WooCommerce" version 4.1.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.2" instead of "3.0")

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
No dangerous file extensions were detected5,476 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
PHP541,2363,8204,731
PO File1326542735
XML1009
CSS1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity9.86
▷ Minimum class complexity1.00
▷ Maximum class complexity158.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces5
Traits0
Classes45
▷ Abstract classes00.00%
▷ Concrete classes45100.00%
▷ Final classes00.00%
Methods353
▷ Static methods10.28%
▷ Public methods31488.95%
▷ Protected methods277.65%
▷ Private methods123.40%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants9
▷ Global constants444.44%
▷ Class constants555.56%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
19 PNG files occupy 0.34MB with 0.30MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/robokassa_emoney_qiwi_wallet.png18.75KB1.84KB▼ 90.20%
assets/img/robokassa_emoney_w1.png17.64KB1.04KB▼ 94.10%
assets/img/robokassa.png13.53KB3.05KB▼ 77.44%
assets/img/robokassa_mobile_phone_mts.png17.95KB1.44KB▼ 91.95%
assets/img/robokassa_emoney_yandex_money.png18.22KB1.90KB▼ 89.55%