84% cashfree-gravity-forms

Code Review | Cashfree Gravity Forms

WordPress plugin Cashfree Gravity Forms scored84%from 54 tests.

About plugin

  • Plugin page: cashfree-gravity-...
  • Plugin version: 1.2.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.2-6.2
  • WordPress version: 6.3.1
  • First release: Dec 23, 2021
  • Latest release: Jun 19, 2023
  • Number of updates: 13
  • Update frequency: every 42.0 days
  • Top authors: devcashfree (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /938 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
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Cashfree Gravity Forms
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.39 ▼4.79
Dashboard /wp-admin3.31 ▲0.0146.47 ▼4.72
Posts /wp-admin/edit.php3.37 ▲0.0145.87 ▼1.76
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.71 ▼20.23
Media Library /wp-admin/upload.php3.24 ▲0.0135.25 ▼0.05

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Cashfree Gravity Forms
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.83 ▲0.191.51 ▼0.1743.00 ▼0.94
Dashboard /wp-admin2,206 ▲155.86 ▲0.97107.64 ▼1.5337.19 ▼2.36
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0539.07 ▼1.9535.30 ▼1.27
Add New Post /wp-admin/post-new.php1,533 ▼023.21 ▼0.06663.60 ▲37.6551.00 ▼3.33
Media Library /wp-admin/upload.php1,385 ▲34.19 ▼0.10106.17 ▲2.6443.54 ▼1.27

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cashfree-gravity-forms/cashfree.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'GFForms' not found in wp-content/plugins/cashfree-gravity-forms/class-gf-cashfree.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: gravityforms, cashfree payments, e-commerce

cashfree-gravity-forms/cashfree.php 92% from 13 tests

"Cashfree Gravity Forms" version 1.2.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cashfree-gravity-forms.php" instead of "cashfree.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin678 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP2142196523
CSS116174
SVG10044
Markdown115027
JavaScript11010

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity20.50
▷ Minimum class complexity2.00
▷ Maximum class complexity39.00
Average method complexity2.95
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods210.00%
▷ Public methods1890.00%
▷ Protected methods00.00%
▷ Private methods210.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants9
▷ Global constants111.11%
▷ Class constants888.89%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin