90% redevoke-sampath-paycorp-payment-gateway-paycorp

Code Review | Sampath Bank Paycorp payment gateway

WordPress plugin Sampath Bank Paycorp payment gateway scored90%from 54 tests.

About plugin

  • Plugin page: redevoke-sampath-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.7.4
  • WordPress version: 6.3.1
  • First release: Jun 7, 2017
  • Latest release: Jun 7, 2017
  • Number of updates: 4
  • Update frequency: every 10.5 days
  • Top authors: redevoke (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,188 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.00MB] [CPU: ▲0.19ms] Passed 4 tests

Analyzing server-side resources used by Sampath Bank Paycorp payment gateway
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.39 ▼7.75
Dashboard /wp-admin3.31 ▲0.0062.47 ▲7.58
Posts /wp-admin/edit.php3.36 ▲0.0051.61 ▲1.70
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.69 ▼0.75
Media Library /wp-admin/upload.php3.23 ▲0.0039.90 ▲8.46

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Sampath Bank Paycorp payment gateway
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2913.67 ▼0.732.20 ▼0.1042.38 ▲1.55
Dashboard /wp-admin2,218 ▲155.85 ▲0.88122.73 ▲8.9844.83 ▲3.99
Posts /wp-admin/edit.php2,100 ▲32.02 ▲0.0238.48 ▼0.1134.64 ▼3.49
Add New Post /wp-admin/post-new.php1,548 ▲1623.08 ▲0.08604.15 ▼37.6480.33 ▲29.56
Media Library /wp-admin/upload.php1,400 ▼04.28 ▲0.09110.00 ▼0.7146.43 ▼1.46

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
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 a smoke test targeting browser errors/issues
There were no browser issues found

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
5 plugin tags: payment gateway, sampath ipg, woocommerce, sampath bank, sampath paycorp

redevoke-sampath-paycorp-payment-gateway-paycorp/re_sampath_paycorp.php 92% from 13 tests

Analyzing the main PHP file in "Sampath Bank Paycorp payment gateway" version 1.0
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("redevoke-sampath-paycorp-payment-gateway-paycorp.php" instead of "re_sampath_paycorp.php")

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
Everything looks great! No dangerous files found in this plugin137 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1358137

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
sampath_paycrop_payment_gateway_logo_redevoke_solutions.png25.78KB6.08KB▼ 76.43%