84% paybox-payment-gateway

Code Review | PayBox

WordPress plugin PayBox scored84%from 54 tests.

About plugin

  • Plugin page: paybox-payment-ga...
  • Plugin version: 1.9.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-6.2
  • WordPress version: 6.3.1
  • First release: Sep 14, 2020
  • Latest release: Sep 1, 2023
  • Number of updates: 47
  • Update frequency: every 23.1 days
  • Top authors: payboxmoney (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,199 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

A check of server-side resources used by PayBox
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.97 ▼3.06
Dashboard /wp-admin3.31 ▲0.0047.67 ▼10.56
Posts /wp-admin/edit.php3.36 ▲0.0045.28 ▼8.00
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.52 ▼5.43
Media Library /wp-admin/upload.php3.23 ▲0.0035.54 ▲1.57

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for PayBox
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.72 ▲0.161.83 ▲0.2552.38 ▲6.01
Dashboard /wp-admin2,195 ▲185.62 ▲0.0790.31 ▼4.0641.71 ▼0.76
Posts /wp-admin/edit.php2,100 ▼31.95 ▼0.0741.10 ▲2.0634.37 ▲0.24
Add New Post /wp-admin/post-new.php1,531 ▲523.13 ▼0.31640.02 ▼34.8956.98 ▲6.09
Media Library /wp-admin/upload.php1,403 ▲34.21 ▲0.03109.45 ▲8.7444.10 ▲2.61

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/paybox-payment-gateway/paybox/includes/class-wc-paybox-payment-gateway.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
There were not plugin tags detected

paybox-payment-gateway/paybox-payment-gateway.php 92% from 13 tests

The main file in "PayBox" v. 1.9.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("7.4" instead of "2.6")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,020 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21693651,020

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity97.00
▷ Minimum class complexity97.00
▷ Maximum class complexity97.00
Average method complexity3.09
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods46
▷ Static methods12.17%
▷ Public methods3473.91%
▷ Protected methods919.57%
▷ Private methods36.52%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants28
▷ Global constants28100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
paybox/assets/images/icon.png15.53KB8.11KB▼ 47.78%