79% idpay-gateway-gravity-forms

Code Review | IDPay for WP Gravity Forms

WordPress plugin IDPay for WP Gravity Forms scored79%from 54 tests.

About plugin

  • Plugin page: idpay-gateway-gra...
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 19, 2020
  • Latest release: Nov 13, 2022
  • Number of updates: 8
  • Update frequency: every 106.1 days
  • Top authors: idpayir (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /3,431 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.61MB] [CPU: ▼3.39ms] Passed 4 tests

An overview of server-side resources used by IDPay for WP Gravity Forms
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.07 ▲0.6136.77 ▼0.72
Dashboard /wp-admin3.92 ▲0.6146.94 ▲0.36
Posts /wp-admin/edit.php4.03 ▲0.6743.53 ▲0.05
Add New Post /wp-admin/post-new.php6.50 ▲0.6182.40 ▼13.23
Media Library /wp-admin/upload.php3.84 ▲0.6142.00 ▲10.12

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by IDPay for WP Gravity Forms
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.34 ▲0.071.68 ▲0.1139.76 ▼0.85
Dashboard /wp-admin2,198 ▲205.54 ▼0.1880.83 ▼16.9446.93 ▲5.43
Posts /wp-admin/edit.php2,109 ▲91.95 ▼0.0335.59 ▼1.3736.37 ▼2.64
Add New Post /wp-admin/post-new.php1,532 ▲623.78 ▲0.68678.42 ▲19.9463.35 ▲10.39
Media Library /wp-admin/upload.php1,409 ▲94.16 ▼0.0598.00 ▼2.4547.63 ▲2.25

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, cannot access private method GF_Gateway_IDPay::deactivation()
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
5 plugin tags: idpay, gravityforms, gateway, gravity-forms, payment

idpay-gateway-gravity-forms/idpay-gravity-forms.php 85% from 13 tests

Analyzing the main PHP file in "IDPay for WP Gravity Forms" version 1.1.2
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("idpay-gateway-gravity-forms.php" instead of "idpay-gravity-forms.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin4,041 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP6615304,016
SVG10125

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity170.67
▷ Minimum class complexity29.00
▷ Maximum class complexity273.00
Average method complexity8.17
▷ Minimum method complexity1.00
▷ Maximum method complexity85.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods71
▷ Static methods71100.00%
▷ Public methods5678.87%
▷ Protected methods34.23%
▷ Private methods1216.90%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin