83% gravity-forms-click-pledge

Code Review | Gravity Forms Click & Pledge

WordPress plugin Gravity Forms Click & Pledge scored83%from 54 tests.

About plugin

  • Plugin page: gravity-forms-cli...
  • Plugin version: 4.23110000-WP6.4.1-G...
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 18, 2015
  • Latest release: Nov 20, 2023
  • Number of updates: 118
  • Update frequency: every 26.1 days
  • Top authors: ClickandPledge (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /8,036 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.34MB] [CPU: ▼4.45ms] Passed 4 tests

A check of server-side resources used by Gravity Forms Click & Pledge
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1839.14 ▲0.82
Dashboard /wp-admin3.67 ▲0.3745.19 ▼6.67
Posts /wp-admin/edit.php3.77 ▲0.4249.15 ▲2.04
Add New Post /wp-admin/post-new.php6.35 ▲0.4683.76 ▼11.69
Media Library /wp-admin/upload.php3.61 ▲0.3834.16 ▼0.27

Server storage [IO: ▲0.94MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 46 new files
Database: no new tables, 7 new options
New WordPress options
gfcnp_plugin
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Gravity Forms Click & Pledge: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲5214.53 ▲0.301.50 ▼0.1743.79 ▼0.43
Dashboard /wp-admin2,204 ▲275.62 ▼0.0594.05 ▼6.2839.68 ▼4.42
Posts /wp-admin/edit.php2,112 ▲121.95 ▼0.0538.76 ▲0.3741.55 ▲6.38
Add New Post /wp-admin/post-new.php1,375 ▼15217.35 ▼5.58544.48 ▼76.6330.73 ▼17.90
Media Library /wp-admin/upload.php1,412 ▲124.24 ▲0.0497.55 ▲1.0038.87 ▼2.13

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • gfcnp_plugin
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/gravity-forms-click-pledge/class.GFCnpRecurringField.php:1672
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/gravity-forms-click-pledge/views/admin-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/gravity-forms-click-pledge/class.GFCnpPlugin.php:87
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/gravity-forms-click-pledge/class.GFCnpEcheckField.php:445

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 83% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Requires at least: The plugin version is formatted incorrectly
  • Screenshots: Please add images for these screenshots: #1 (Settings page), #2 (Form Editor), #3 (Form display in front end), #4 (Credit Card Error display), #5 (Click & Pledge feed), #6 (Recurring Field), #7 (Credit Card Fields), #8 (eCheck Fields)
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
The official readme.txt is a good inspiration

gravity-forms-click-pledge/gravityforms-cnp.php 85% from 13 tests

The main file in "Gravity Forms Click & Pledge" v. 4.23110000-WP6.4.1-G... serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Version: The version number should be digits and periods (ex. "1.0.3" instead of "4.23110000-WP6.4.1-G...")
  • Main file name: Name the main plugin file the same as the plugin slug ("gravity-forms-click-pledge.php" instead of "gravityforms-cnp.php")

Code Analysis 97% from 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 detected8,349 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP131,5531,2606,756
JavaScript10245133931
XML200622
CSS17140

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
Please tend to the following items
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 256)
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity98.79
▷ Minimum class complexity1.00
▷ Maximum class complexity384.00
Average method complexity8.17
▷ Minimum method complexity1.00
▷ Maximum method complexity256.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods193
▷ Static methods6533.68%
▷ Public methods16786.53%
▷ Protected methods147.25%
▷ Private methods126.22%
Functions9
▷ Named functions333.33%
▷ Anonymous functions666.67%
Constants21
▷ Global constants21100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
13 PNG files occupy 0.45MB with 0.32MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png53.87KB15.36KB▼ 71.49%
screenshot-6.png52.42KB15.97KB▼ 69.54%
images/cnp logo.png35.90KB6.68KB▼ 81.40%
screenshot-1.png93.46KB28.09KB▼ 69.95%
screenshot-5.png41.08KB16.10KB▼ 60.81%