84% payment-gateway-through-payletter

Code Review | Payment Gateway through Payletter

WordPress plugin Payment Gateway through Payletter scored84%from 54 tests.

About plugin

  • Plugin page: payment-gateway-t...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 15, 2022
  • Latest release: Dec 15, 2022
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: antondrob2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /133 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼8.94ms] Passed 4 tests

Server-side resources used by Payment Gateway through Payletter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2034.74 ▼4.79
Dashboard /wp-admin3.49 ▲0.1544.03 ▼10.54
Posts /wp-admin/edit.php3.61 ▲0.2548.14 ▲2.33
Add New Post /wp-admin/post-new.php6.08 ▲0.1981.06 ▼22.75
Media Library /wp-admin/upload.php3.42 ▲0.1935.90 ▲2.77

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Payment Gateway through Payletter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.31 ▼1.071.78 ▼0.1038.99 ▼6.22
Dashboard /wp-admin2,209 ▲214.81 ▼0.13102.56 ▼7.3339.65 ▼5.14
Posts /wp-admin/edit.php2,089 ▼32.04 ▲0.0739.79 ▼0.9537.32 ▲2.66
Add New Post /wp-admin/post-new.php1,542 ▲1418.22 ▲0.08612.08 ▼8.8552.96 ▼5.01
Media Library /wp-admin/upload.php1,388 ▼34.15 ▼0.0094.37 ▼6.7141.28 ▼1.18

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 did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • payletter_pay_wc_transient
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Onepix\\Payletter\\Gateways\\Payletter_Pay_WC_Payletter_Gateway' not found in wp-content/plugins/payment-gateway-through-payletter/gateways/Payletter_Pay_WC_Payletter_PaypalExpressCheckout.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/payment-gateway-through-payletter/gateways/Payletter_Pay_WC_Payletter_Gateway.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Onepix\\Payletter\\Gateways\\Payletter_Pay_WC_Payletter_Gateway' not found in wp-content/plugins/payment-gateway-through-payletter/gateways/Payletter_Pay_WC_Payletter_PLCreditCardMpi.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Onepix\\Payletter\\Gateways\\Payletter_Pay_WC_Payletter_Gateway' not found in wp-content/plugins/payment-gateway-through-payletter/gateways/Payletter_Pay_WC_Payletter_PLCreditCard.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Onepix\\Payletter\\Gateways\\Payletter_Pay_WC_Payletter_Gateway' not found in wp-content/plugins/payment-gateway-through-payletter/gateways/Payletter_Pay_WC_Payletter_PLUnionPay.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

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
4 plugin tags: woocommerce, payletter, payment, gateway

payment-gateway-through-payletter/payment-gateway-through-payletter.php 92% from 13 tests

Analyzing the main PHP file in "Payment Gateway through Payletter" version 1.0.2
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 363 characters long)

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
Success! There were no dangerous files found in this plugin2,844 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP264906152,748
JavaScript121391
JSON1005

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity19.88
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity3.59
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes17
▷ Abstract classes15.88%
▷ Concrete classes1694.12%
▷ Final classes00.00%
Methods123
▷ Static methods1814.63%
▷ Public methods12198.37%
▷ Protected methods00.00%
▷ Private methods21.63%
Functions13
▷ Named functions1184.62%
▷ Anonymous functions215.38%
Constants3
▷ Global constants3100.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