84% logistic-pro-pay

Code Review | Payment Gateway - Logistic Pro Pay

WordPress plugin Payment Gateway - Logistic Pro Pay scored84%from 54 tests.

About plugin

  • Plugin page: logistic-pro-pay
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.8.1
  • WordPress version: 6.3.1
  • First release: Sep 27, 2021
  • Latest release: Sep 28, 2021
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: logisticprotrade (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /410 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.01MB] [CPU: ▼4.32ms] Passed 4 tests

An overview of server-side resources used by Payment Gateway - Logistic Pro Pay
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.37 ▼5.28
Dashboard /wp-admin3.31 ▲0.0146.44 ▼1.48
Posts /wp-admin/edit.php3.36 ▲0.0146.22 ▼2.19
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.64 ▼7.14
Media Library /wp-admin/upload.php3.23 ▲0.0135.59 ▼2.65

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Payment Gateway - Logistic Pro Pay
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▼0.181.69 ▼0.1640.69 ▼5.30
Dashboard /wp-admin2,206 ▲354.83 ▼1.02111.79 ▲5.0144.08 ▼4.89
Posts /wp-admin/edit.php2,092 ▲32.02 ▲0.0139.60 ▲3.9036.11 ▲4.84
Add New Post /wp-admin/post-new.php1,542 ▲823.12 ▲0.01590.55 ▼105.1352.21 ▼8.95
Media Library /wp-admin/upload.php1,385 ▼04.21 ▼0.0594.93 ▼4.1341.22 ▼2.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/logistic-pro-pay/gateway-logistic-pro-pay.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: payment, shopping cart, gateway, woocommerce, crypto currencies

logistic-pro-pay/gateway-logistic-pro-pay.php 92% from 13 tests

"Payment Gateway - Logistic Pro Pay" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("logistic-pro-pay.php" instead of "gateway-logistic-pro-pay.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected457 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2115190404
CSS12043
JavaScript14010

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity20.50
▷ Minimum class complexity5.00
▷ Maximum class complexity36.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods14.76%
▷ Public methods1990.48%
▷ Protected methods29.52%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected