90% paymentsense-gateway-for-woocommerce

Code Review | WooCommerce Paymentsense Gateway

WordPress plugin WooCommerce Paymentsense Gateway scored90%from 54 tests.

About plugin

  • Plugin page: paymentsense-gate...
  • Plugin version: 3.0.39
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.9
  • WordPress version: 6.3.1
  • First release: Feb 27, 2018
  • Latest release: Jan 27, 2022
  • Number of updates: 108
  • Update frequency: every 13.3 days
  • Top authors: paymentsense (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /14,749 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.10MB] [CPU: ▼8.85ms] Passed 4 tests

Server-side resources used by WooCommerce Paymentsense Gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1236.72 ▼2.84
Dashboard /wp-admin3.41 ▲0.0744.16 ▼17.87
Posts /wp-admin/edit.php3.47 ▲0.1144.39 ▼3.62
Add New Post /wp-admin/post-new.php6.00 ▲0.1188.47 ▼11.07
Media Library /wp-admin/upload.php3.34 ▲0.1132.14 ▼0.41

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Paymentsense Gateway
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.131.63 ▼0.2139.73 ▲1.97
Dashboard /wp-admin2,206 ▲155.85 ▲0.96105.11 ▲1.7044.54 ▲1.76
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0539.46 ▼0.3735.98 ▼0.26
Add New Post /wp-admin/post-new.php1,514 ▼517.72 ▼5.21627.76 ▼43.8456.40 ▲0.51
Media Library /wp-admin/upload.php1,385 ▼64.19 ▼0.1694.19 ▼8.5941.78 ▼2.94

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 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 Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: payments, paymentsense, credit card, checkout

paymentsense-gateway-for-woocommerce/paymentsense-gateway-for-woocommerce.php 92% from 13 tests

The main PHP file in "WooCommerce Paymentsense Gateway" ver. 3.0.39 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected3,671 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP133381,0173,203
PO File22320468

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity89.33
▷ Minimum class complexity58.00
▷ Maximum class complexity143.00
Average method complexity3.55
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
Methods98
▷ Static methods11.02%
▷ Public methods4242.86%
▷ Protected methods5253.06%
▷ Private methods44.08%
Functions9
▷ Named functions777.78%
▷ Anonymous functions222.22%
Constants30
▷ Global constants1033.33%
▷ Class constants2066.67%
▷ Public constants20100.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 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/paymentsense-logo.png0.96KB1.18KB0.00%