90% xpresspay-payment-gateway

Code Review | XpressPay Payment Gateway

WordPress plugin XpressPay Payment Gateway scored90%from 54 tests.

About plugin

  • Plugin page: xpresspay-payment...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9
  • WordPress version: 6.3.1
  • First release: Feb 14, 2022
  • Latest release: Feb 14, 2022
  • Number of updates: 2
  • Update frequency: every 5.0 days
  • Top authors: xpresspay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /793 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.03MB] [CPU: ▼10.29ms] Passed 4 tests

An overview of server-side resources used by XpressPay Payment Gateway
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.0540.04 ▼4.52
Dashboard /wp-admin3.62 ▼0.0150.17 ▼16.16
Posts /wp-admin/edit.php3.73 ▲0.0555.44 ▼1.96
Add New Post /wp-admin/post-new.php6.20 ▲0.0585.13 ▼18.52
Media Library /wp-admin/upload.php3.54 ▲0.0537.18 ▼1.66

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for XpressPay Payment Gateway
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.26 ▼0.091.97 ▲0.0241.75 ▼2.19
Dashboard /wp-admin2,198 ▲185.60 ▼0.0393.81 ▼5.5039.18 ▼3.91
Posts /wp-admin/edit.php2,100 ▼02.05 ▲0.0539.49 ▼8.0435.85 ▼2.76
Add New Post /wp-admin/post-new.php1,531 ▼1921.04 ▼2.38631.99 ▼53.6653.45 ▼4.78
Media Library /wp-admin/upload.php1,400 ▼34.24 ▲0.1199.85 ▼10.5544.68 ▼0.38

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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

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

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: xpresspay plugins, verve cards, mastercard, payment gateway, visa...

xpresspay-payment-gateway/xpress-pay.php 92% from 13 tests

This is the main PHP file of "XpressPay Payment Gateway" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("xpresspay-payment-gateway.php" instead of "xpress-pay.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin326 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15326289
JavaScript119037

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity3.08
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.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

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/xpresspay-payment-options.png18.68KB6.90KB▼ 63.07%
assets/images/xpresslogo.png11.21KB4.20KB▼ 62.56%
assets/images/xpresspay-payment-optionsl.png24.68KB5.68KB▼ 76.98%