89% sampath-vishwa-payment-gateway

Code Review | Sampath Vishwa payment gateway

WordPress plugin Sampath Vishwa payment gateway scored89%from 54 tests.

About plugin

  • Plugin page: sampath-vishwa-pa...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.8
  • WordPress version: 6.3.1
  • First release: Jun 9, 2016
  • Latest release: Jan 19, 2017
  • Number of updates: 6
  • Update frequency: every 96.2 days
  • Top authors: Oganro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /800 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.12ms] Passed 4 tests

A check of server-side resources used by Sampath Vishwa payment gateway
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.52 ▼3.02
Dashboard /wp-admin3.31 ▲0.0043.06 ▼2.95
Posts /wp-admin/edit.php3.36 ▲0.0039.05 ▼8.08
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.15 ▼6.44
Media Library /wp-admin/upload.php3.23 ▲0.0034.04 ▲0.71

Server storage [IO: ▲0.20MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Sampath Vishwa payment gateway
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.411.69 ▲0.1637.31 ▼2.01
Dashboard /wp-admin2,195 ▲185.52 ▼0.0781.62 ▼8.2836.59 ▼10.79
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0633.97 ▼6.9337.53 ▲4.82
Add New Post /wp-admin/post-new.php1,536 ▲823.00 ▼0.12593.24 ▼81.7054.54 ▲1.85
Media Library /wp-admin/upload.php1,394 ▼34.21 ▲0.0599.78 ▲2.7545.69 ▼1.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed: The official readme.txt might help

sampath-vishwa-payment-gateway/sampath-vishwa-payment-gateway-plugin.php 92% from 13 tests

"Sampath Vishwa payment gateway" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("sampath-vishwa-payment-gateway.php" instead of "sampath-vishwa-payment-gateway-plugin.php")

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

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.07MB with 0.06MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
sampath.png66.95KB4.25KB▼ 93.66%