89% upi-qr-code-payment-for-woocommerce

Code Review | UPI QR Code Payment Gateway for WooCommerce

WordPress plugin UPI QR Code Payment Gateway for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: upi-qr-code-payme...
  • Plugin version: 1.3.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.3
  • WordPress version: 6.3.1
  • First release: Jan 30, 2020
  • Latest release: Jul 22, 2023
  • Number of updates: 59
  • Update frequency: every 21.7 days
  • Top authors: infosatech (100%)

Code review

54 tests

User reviews

205 reviews

Install metrics

20,000+ active /213,149 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.02MB] [CPU: ▼2.33ms] Passed 4 tests

This is a short check of server-side resources used by UPI QR Code Payment Gateway for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0241.17 ▼5.14
Dashboard /wp-admin3.32 ▲0.0253.32 ▲1.00
Posts /wp-admin/edit.php3.37 ▲0.0253.36 ▲0.68
Add New Post /wp-admin/post-new.php5.90 ▲0.0289.11 ▼5.86
Media Library /wp-admin/upload.php3.25 ▲0.0237.54 ▲1.03

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 7 new options
New WordPress options
upiwc_plugin_installed_time
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 UPI QR Code Payment Gateway for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲3814.38 ▼0.042.16 ▲0.1744.36 ▼1.45
Dashboard /wp-admin2,195 ▲185.68 ▲0.0180.75 ▼10.0740.99 ▼1.98
Posts /wp-admin/edit.php2,100 ▲182.01 ▲0.0236.71 ▼0.5834.12 ▼2.91
Add New Post /wp-admin/post-new.php1,526 ▼023.28 ▲0.33677.67 ▼10.3554.06 ▼0.56
Media Library /wp-admin/upload.php1,400 ▼04.21 ▲0.0396.35 ▼27.3441.49 ▼5.87

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means 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
Congratulations! This plugin passed the SRP test

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 93% from 29 tests

readme.txt Passed 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
7 plugin tags: qrcode, woocommerce, upi, bhim upi, paytm upi...

upi-qr-code-payment-for-woocommerce/upi-qr-code-payment-for-woocommerce.php 85% from 13 tests

The principal PHP file in "UPI QR Code Payment Gateway for WooCommerce" v. 1.3.6 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 158 characters long)
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.6" instead of "3.1")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin926 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP3159342890
JavaScript402816
SVG40016
CSS4084

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity70.50
▷ Minimum class complexity28.00
▷ Maximum class complexity113.00
Average method complexity4.86
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods37
▷ Static methods12.70%
▷ Public methods3183.78%
▷ Protected methods00.00%
▷ Private methods616.22%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
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
includes/icon/logo.png4.22KB2.12KB▼ 49.73%