90% paykeeper

Code Review | PayKeeper Payment Gateway for WooCommerce

WordPress plugin PayKeeper Payment Gateway for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: paykeeper
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.8
  • WordPress version: 6.3.1
  • First release: Aug 6, 2021
  • Latest release: Aug 11, 2021
  • Number of updates: 7
  • Update frequency: every 1.0 days
  • Top authors: mozgby (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,056 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by PayKeeper Payment Gateway for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0633.61 ▼3.63
Dashboard /wp-admin3.36 ▲0.0640.29 ▼9.61
Posts /wp-admin/edit.php3.48 ▲0.1248.41 ▲2.19
Add New Post /wp-admin/post-new.php5.94 ▲0.0676.60 ▼21.86
Media Library /wp-admin/upload.php3.29 ▲0.0635.72 ▼1.85

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for PayKeeper Payment Gateway for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.24 ▼0.961.61 ▼0.2038.09 ▼2.82
Dashboard /wp-admin2,206 ▲355.86 ▲0.01111.95 ▼1.1842.47 ▼2.89
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0839.83 ▼0.2734.47 ▼3.63
Add New Post /wp-admin/post-new.php1,520 ▼1423.05 ▼0.19649.66 ▼3.4650.74 ▼1.71
Media Library /wp-admin/upload.php1,391 ▲64.27 ▲0.0698.20 ▼1.8743.27 ▲0.49

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 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 Passed 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
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 just a short smoke test looking for browser 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 important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: paykeeper, payment gateway, woocommerce

paykeeper/paykeeper.php Passed 13 tests

The main PHP file in "PayKeeper Payment Gateway for WooCommerce" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
121 characters long description:
Easily adds PayKeeper payment gateway to the WooCommerce plugin so you can allow customers to checkout PayKeeper gateway.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin678 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP38446573
PO File23636105

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity20.00
▷ Minimum class complexity3.00
▷ Maximum class complexity40.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods43
▷ Static methods00.00%
▷ Public methods43100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
banner.png7.33KB2.80KB▼ 61.79%