83% paytm-payments

Code Review | Paytm Payment Gateway

WordPress plugin Paytm Payment Gateway scored 83% from 54 tests.

About plugin

  • Plugin page: paytm-payments
  • Plugin version: 2.8.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-6.2
  • WordPress version: 6.3.1
  • First release: Oct 11, 2018
  • Latest release: Jul 13, 2023
  • Number of updates: 46
  • Update frequency: every 37.8 days
  • Top authors: integrationdevpaytm (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

9,000+ active / 136,862 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 gracefully, with no errors

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

An overview of server-side resources used by Paytm Payment Gateway
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.01 ▼4.05
Dashboard /wp-admin3.32 ▲0.0144.26 ▼19.38
Posts /wp-admin/edit.php3.43 ▲0.0747.56 ▼1.55
Add New Post /wp-admin/post-new.php5.90 ▲0.0196.57 ▲5.90
Media Library /wp-admin/upload.php3.24 ▲0.0138.43 ▲5.80

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 12 new files
Database: 1 new table, 6 new options
New tables
wp_paytm_order_data
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Paytm Payment Gateway
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9613.11 ▼1.264.73 ▲2.8937.77 ▼8.11
Dashboard /wp-admin2,209 ▲215.85 ▲0.9796.20 ▼24.2639.41 ▼7.46
Posts /wp-admin/edit.php2,095 ▲32.04 ▼0.0840.47 ▲3.5935.53 ▲0.51
Add New Post /wp-admin/post-new.php1,542 ▲723.34 ▲0.03623.26 ▼61.6555.49 ▲4.83
Media Library /wp-admin/upload.php1,397 ▲94.20 ▼0.0197.36 ▼11.4042.11 ▼4.17

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/paytm-payments/class.paytm.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: paytm payments, paytm plugin, paytm, paytm payment gateway, paywithpaytm...

paytm-payments/woo-paytm.php 77% from 13 tests

The main PHP script in "Paytm Payment Gateway" version 2.8.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 556 characters long)
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: Name the main plugin file the same as the plugin slug ("paytm-payments.php" instead of "woo-paytm.php")

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
Good job! No executable or dangerous file extensions detected1,390 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP51831671,149
JavaScript22011131
CSS2143108
SVG2002

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.30
Average class complexity24.00
▷ Minimum class complexity1.00
▷ Maximum class complexity68.00
Average method complexity3.68
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods35
▷ Static methods1954.29%
▷ Public methods2160.00%
▷ Protected methods00.00%
▷ Private methods1440.00%
Functions20
▷ Named functions1890.00%
▷ Anonymous functions210.00%
Constants49
▷ Global constants00.00%
▷ Class constants49100.00%
▷ Public constants49100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin