84% pay-with-paytm-qr-offline-payment-gateway

Code Review | paytm QR payment gateway

WordPress plugin paytm QR payment gateway scored84%from 54 tests.

About plugin

  • Plugin page: pay-with-paytm-qr...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7
  • WordPress version: 6.3.1
  • First release: Dec 8, 2016
  • Latest release: Dec 14, 2016
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: smitraval (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /12,819 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼9.24ms] Passed 4 tests

A check of server-side resources used by paytm QR payment gateway
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.18 ▼3.96
Dashboard /wp-admin3.31 ▼0.0446.17 ▼17.68
Posts /wp-admin/edit.php3.36 ▲0.0047.74 ▼6.18
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.74 ▼9.14
Media Library /wp-admin/upload.php3.23 ▲0.0037.68 ▼1.73

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for paytm QR payment gateway
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.38 ▲0.121.92 ▲0.4042.37 ▲1.73
Dashboard /wp-admin2,189 ▲125.55 ▼0.1483.47 ▼13.1038.35 ▼3.79
Posts /wp-admin/edit.php2,097 ▼31.96 ▼0.0536.65 ▼4.2132.47 ▼3.74
Add New Post /wp-admin/post-new.php1,531 ▲323.05 ▲0.08618.24 ▼62.1253.85 ▼3.15
Media Library /wp-admin/upload.php1,403 ▲34.15 ▼0.11100.84 ▼2.1745.10 ▼1.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/pay-with-paytm-qr-offline-payment-gateway/paytm-qr-gateway.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: payment, offline payment, pay, qr, gateway...

pay-with-paytm-qr-offline-payment-gateway/paytm-qr-gateway.php 85% from 13 tests

The main PHP script in "paytm QR payment gateway" version 1.0.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("pay-with-paytm-qr-offline-payment-gateway.php" instead of "paytm-qr-gateway.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 146 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected112 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12432112

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.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
There are no PNG files in this plugin