89% interswitch-webpay-woocommerce-payment-gateway

Code Review | Interswitch Webpay WooCommerce Payment Gateway

WordPress plugin Interswitch Webpay WooCommerce Payment Gateway scored89%from 54 tests.

About plugin

  • Plugin page: interswitch-webpa...
  • Plugin version: 4.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9
  • WordPress version: 6.3.1
  • First release: Jul 16, 2014
  • Latest release: Jan 13, 2018
  • Number of updates: 32
  • Update frequency: every 39.9 days
  • Top authors: tubiz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /10,588 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼5.64ms] Passed 4 tests

This is a short check of server-side resources used by Interswitch Webpay WooCommerce Payment Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0734.34 ▼6.54
Dashboard /wp-admin3.38 ▲0.0746.71 ▼0.19
Posts /wp-admin/edit.php3.43 ▲0.0748.55 ▲3.57
Add New Post /wp-admin/post-new.php5.96 ▲0.0781.56 ▼17.25
Media Library /wp-admin/upload.php3.30 ▲0.0734.95 ▲1.44

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Interswitch Webpay WooCommerce Payment Gateway
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.71 ▲0.151.91 ▲0.2640.27 ▲2.66
Dashboard /wp-admin2,198 ▲185.65 ▲0.0286.08 ▲0.0940.67 ▼4.64
Posts /wp-admin/edit.php2,103 ▼01.96 ▼0.0241.18 ▼1.1837.52 ▲0.32
Add New Post /wp-admin/post-new.php1,526 ▼023.08 ▲0.38602.34 ▲3.8966.56 ▲2.87
Media Library /wp-admin/upload.php1,400 ▼34.20 ▲0.0496.74 ▼5.1140.30 ▼2.79

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt might help

interswitch-webpay-woocommerce-payment-gateway/interswitch-webpay-woocommere-payment-gateway.php 85% from 13 tests

This is the main PHP file of "Interswitch Webpay WooCommerce Payment Gateway" version 4.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("interswitch-webpay-woocommerce-payment-gateway.php" instead of "interswitch-webpay-woocommere-payment-gateway.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 143 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin393 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP117190393

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity3.58
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/interswitch.png12.02KB3.90KB▼ 67.52%