10% paytm-gravity-forms

Code Review | Paytm Gravity Forms

WordPress plugin Paytm Gravity Forms scored 10% from 54 tests.

About plugin

  • Plugin page: paytm-gravity-forms
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-4.9.1
  • WordPress version: 5.8.1
  • First release: Dec 20, 2018
  • Latest release: Dec 20, 2018
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: integrationdevpaytm (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 1,294 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/paytm-gravity-forms/lib/encdec_paytm.php+24
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼0.90MB] [CPU: ▼184.32ms] Passed 4 tests

A check of server-side resources used by Paytm Gravity Forms
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.73 ▲0.0112.13 ▼7.82
Dashboard /wp-admin2.75 ▼0.317.59 ▼32.19
Posts /wp-admin/edit.php2.75 ▼0.367.80 ▼32.95
Add New Post /wp-admin/post-new.php2.75 ▼2.688.01 ▼649.79
Media Library /wp-admin/upload.php2.75 ▼0.258.11 ▼22.33

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 16 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Paytm Gravity Forms
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8316.28 ▲0.808.66 ▼0.5946.86 ▼2.66
Dashboard /wp-admin2,970 ▲365.90 ▼0.21133.73 ▼20.67115.35 ▼1.00
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0063.09 ▼2.8886.95 ▼2.14
Add New Post /wp-admin/post-new.php1,500 ▼018.51 ▼0.14363.31 ▼3.36110.82 ▼1.28
Media Library /wp-admin/upload.php1,810 ▲34.99 ▼0.01141.91 ▼5.00117.95 ▲9.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/paytm-gravity-forms/lib/encdec_paytm.php+24
    Array and string offset access syntax with curly braces is deprecated

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | 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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/paytm-gravity-forms/paytm-form.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 83% 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
6 plugin tags: paytm payment gateway, paytm gravity forms, paytm plugin, paywithpaytm, paytm payments...

paytm-gravity-forms/paytm-form.php 62% from 13 tests

The main file in "Paytm Gravity Forms" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • 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-gravity-forms.php" instead of "paytm-form.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 493 characters long)
  • Requires at least: Required version must match the one declared in readme.txt ("4.9" instead of "4.0.1")
  • Requires PHP: Required version must match the one declared in readme.txt ("5.3" instead of "5.6")

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
No dangerous file extensions were detected2,661 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP36091412,572
JavaScript2231289

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.37
Average class complexity105.00
▷ Minimum class complexity13.00
▷ Maximum class complexity284.00
Average method complexity4.47
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods90
▷ Static methods8897.78%
▷ Public methods5864.44%
▷ Protected methods11.11%
▷ Private methods3134.44%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/tooltip_tip.png0.24KB0.28KB0.00%
images/sagepay_form_wordpress_icon_32.png19.58KB1.53KB▼ 92.18%
images/active1.png0.71KB0.63KB▼ 11.28%
images/remove.png3.32KB0.62KB▼ 81.33%
images/add.png3.37KB0.66KB▼ 80.54%