84% paysend-business

Code Review | Paysend payment gateway

WordPress plugin Paysend payment gateway scored84%from 54 tests.

About plugin

  • Plugin page: paysend-business
  • Plugin version: 2.0.0
  • PHP compatiblity: 5.6.32+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.9.2
  • WordPress version: 6.3.1
  • First release: Mar 28, 2022
  • Latest release: Dec 21, 2022
  • Number of updates: 36
  • Update frequency: every 7.6 days
  • Top authors: paysendbusiness (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /840 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.66MB] [CPU: ▼14.37ms] Passed 4 tests

Server-side resources used by Paysend payment gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0044.65 ▲3.86
Dashboard /wp-admin3.31 ▲0.0051.16 ▼3.00
Posts /wp-admin/edit.php3.36 ▲0.0054.56 ▲6.47
Add New Post /wp-admin/post-new.php3.26 ▼2.6338.34 ▼61.75
Media Library /wp-admin/upload.php3.23 ▲0.0042.40 ▲3.41

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

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

Browser metrics Passed 4 tests

Paysend payment gateway: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7913.50 ▼1.065.06 ▲2.8149.80 ▲2.77
Dashboard /wp-admin2,218 ▲245.79 ▼0.0799.43 ▼15.3937.12 ▼8.53
Posts /wp-admin/edit.php2,097 ▼32.04 ▼0.0138.83 ▲2.2036.06 ▼1.08
Add New Post /wp-admin/post-new.php1,545 ▼522.93 ▼0.28694.77 ▼4.1565.82 ▲0.47
Media Library /wp-admin/upload.php1,397 ▼34.22 ▼0.03114.95 ▼8.1148.09 ▼1.42

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Undefined index: status in wp-content/plugins/paysend-business/payment.php on line 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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: payment gateway, ecommerce, paysend, paysend woocommerce, woo-commerce...

paysend-business/wc-paysend.php 92% from 13 tests

This is the main PHP file of "Paysend payment gateway" version 2.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("paysend-business.php" instead of "wc-paysend.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin291 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP46646271
SVG10020

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity3.67
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants225.00%
▷ Class constants675.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin