83% upi-qr-code-payment-gateway

Code Review | UPI QR Code Payment Gateway

WordPress plugin UPI QR Code Payment Gateway scored83%from 54 tests.

About plugin

  • Plugin page: upi-qr-code-payme...
  • Plugin version: 1.3.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.0.2
  • WordPress version: 6.3.1
  • First release: Mar 17, 2021
  • Latest release: Sep 3, 2022
  • Number of updates: 5
  • Update frequency: every 107.2 days
  • Top authors: dewtechnolab (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /12,093 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.44ms] Passed 4 tests

This is a short check of server-side resources used by UPI QR Code Payment Gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.33 ▲2.47
Dashboard /wp-admin3.32 ▲0.0246.25 ▼4.04
Posts /wp-admin/edit.php3.44 ▲0.0848.74 ▲0.74
Add New Post /wp-admin/post-new.php5.90 ▲0.0285.17 ▼8.94
Media Library /wp-admin/upload.php3.25 ▲0.0237.27 ▲6.14

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
dwu_installed_time
db_upgraded
theysaidso_admin_options
can_compress_scripts
dwu_version
widget_theysaidso_widget
dwu_plugin_activated
widget_recent-comments

Browser metrics Passed 4 tests

UPI QR Code Payment Gateway: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲7513.26 ▼1.121.82 ▼0.1541.51 ▼1.34
Dashboard /wp-admin2,206 ▲185.89 ▲1.01111.40 ▲7.6341.44 ▼2.58
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.1341.36 ▲5.3435.03 ▼0.67
Add New Post /wp-admin/post-new.php1,514 ▼517.90 ▼5.15622.18 ▼51.4239.79 ▼13.08
Media Library /wp-admin/upload.php1,391 ▼04.18 ▼0.0592.77 ▼5.7943.28 ▲0.61

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • dwu_plugin_activated
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/upi-qr-code-payment-gateway/core/classes/class.payment.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/upi-qr-code-payment-gateway/core/classes/class.donate.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/upi-qr-code-payment-gateway/core/classes/class.notice.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: paytm upi, india, bhim upi, upi, upi payment...

upi-qr-code-payment-gateway/upi-qr-code-payment-gateway.php 77% from 13 tests

The principal PHP file in "UPI QR Code Payment Gateway" v. 1.3.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 169 characters long)
  • Requires at least: The required version number must match the one declared in readme.txt ("4.5.0" instead of "4.5")
  • 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
Everything looks great! No dangerous files found in this plugin862 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP597203854
JavaScript41105
CSS3083

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity33.50
▷ Minimum class complexity11.00
▷ Maximum class complexity92.00
Average method complexity4.42
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods38
▷ Static methods410.53%
▷ Public methods38100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants15100.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/dwu-logo.png4.22KB2.12KB▼ 49.73%