46% click-pledge-connect

Code Review | Click & Pledge Connect Plugin

WordPress plugin Click & Pledge Connect Plugin scored46%from 54 tests.

About plugin

  • Plugin page: click-pledge-connect
  • Plugin version: 02.2301020000-WP6.1....
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 7, 2017
  • Latest release: Jan 24, 2023
  • Number of updates: 41
  • Update frequency: every 48.4 days
  • Top authors: ClickandPledge (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /5,685 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.50MB] [CPU: ▼22.20ms] Passed 4 tests

Server-side resources used by Click & Pledge Connect Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4661.60 ▲20.63
Dashboard /wp-admin3.45 ▲0.1434.81 ▼17.83
Posts /wp-admin/edit.php3.45 ▲0.0939.28 ▼12.76
Add New Post /wp-admin/post-new.php3.45 ▼2.4439.36 ▼57.65
Media Library /wp-admin/upload.php3.45 ▲0.2136.77 ▼0.54
Settings /wp-admin/admin.php?page=cnp_formssettings3.4535.86
Click & Pledge /wp-admin/admin.php?page=cnpcf_formshelp3.4537.61

Server storage [IO: ▲3.22MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 71 new files
Database: 5 new tables, 6 new options
New tables
wp_cnp_forminfo
wp_cnp_channeldtl
wp_cnp_settingsdtl
wp_cnp_formsdtl
wp_cnp_channelgrp
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Click & Pledge Connect Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲14913.81 ▼0.545.68 ▲3.8643.24 ▼0.89
Dashboard /wp-admin2,232 ▲525.72 ▲0.1985.71 ▼7.3738.56 ▼2.55
Posts /wp-admin/edit.php2,143 ▲402.19 ▲0.1937.74 ▼5.1234.03 ▼1.12
Add New Post /wp-admin/post-new.php1,561 ▲3523.25 ▲0.17601.20 ▼63.4152.44 ▼0.19
Media Library /wp-admin/upload.php1,440 ▲404.20 ▲0.0489.92 ▼16.0643.88 ▼5.36
Settings /wp-admin/admin.php?page=cnp_formssettings1,0492.2039.9140.35
Click & Pledge /wp-admin/admin.php?page=cnpcf_formshelp9561.7625.5636.34

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin does not fully uninstall, leaving 5 tables in the database
    • wp_cnp_channeldtl
    • wp_cnp_forminfo
    • wp_cnp_formsdtl
    • wp_cnp_channelgrp
    • wp_cnp_settingsdtl
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 14 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cnpcf_formshelp
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/admin.php?page=cnp_formssettings
    • > Notice in wp-content/plugins/click-pledge-connect/cnpSettings.php+5
    Undefined index: info
    • > GET request to /wp-admin/admin.php?page=cnp_formssettings
    • > Notice in wp-content/plugins/click-pledge-connect/cnpSettings.php+67
    Undefined index: cnpviewid
    • > GET request to /wp-admin/admin.php?page=cnp_formssettings
    • > Notice in wp-content/plugins/click-pledge-connect/cnpSettings.php+101
    Undefined index: act
    • > GET request to /wp-admin/admin.php?page=cnp_formssettings
    • > Notice in wp-content/plugins/click-pledge-connect/cnpSettings.php+119
    Undefined variable: cnpsetid
    • > GET request to /wp-admin/admin.php?page=cnp_formssettings
    • > Notice in wp-content/plugins/click-pledge-connect/cnpSettings.php+123
    Undefined variable: cnpsetAccountNumber
    • > GET request to /wp-admin/admin.php?page=cnp_formssettings
    • > Notice in wp-content/plugins/click-pledge-connect/cnpSettings.php+131
    Undefined variable: cnpsetguid
    • > GET request to /wp-admin/admin.php?page=cnp_formssettings
    • > Notice in wp-content/plugins/click-pledge-connect/cnpSettings.php+145
    Undefined variable: cnpsetfrndlynm

SRP 0% 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 fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/click-pledge-connect/cnpSettingmsgs.php
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant SOAP_1_1 - assumed 'SOAP_1_1' (this will throw an Error in a future version of PHP) in wp-content/plugins/click-pledge-connect/getcnpactivecampaigns.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_time() in wp-content/plugins/click-pledge-connect/clickandpledge_form.php:20
    • > PHP Warning
      Use of undefined constant SOAP_1_1 - assumed 'SOAP_1_1' (this will throw an Error in a future version of PHP) in wp-content/plugins/click-pledge-connect/getcnpditactivecampaigns.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'SoapClient' not found in wp-content/plugins/click-pledge-connect/getcnpactivechannels.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'SoapClient' not found in wp-content/plugins/click-pledge-connect/getcnpactivecampaigns.php:5
    • > PHP Warning
      Use of undefined constant SOAP_1_1 - assumed 'SOAP_1_1' (this will throw an Error in a future version of PHP) in wp-content/plugins/click-pledge-connect/getcnpactivechannels.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'SoapClient' not found in wp-content/plugins/click-pledge-connect/getcnpditactivecampaigns.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=cnp_formssettings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot set properties of undefined (setting '_DT_CellIndex')" "TypeError: Cannot set properties of undefined (setting '_DT_CellIndex')\n at Ja (/wp-content/plugins/click-pledge-connect/js/jquery.dataTables.min.js?ver=6.3.1:24:263)\n at N (/wp-content/plugins/click-pledge-connect/js/jquery.dataTables.min.js?ver=6.3.1:16:337)\n at HTMLTableRowElement.\u003Canonymous> (/wp-content/plugins/click-pledge-connect/js/jquery.dataTables.min.js?ver=6.3.1:16:450)\n at /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,utils&ver=6.3.1:2:1681\n at Function.map (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,utils&ver=6.3.1:2:3967)\n at ce.fn.init.map (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,utils&ver=6.3.1:2:1649)\n at oa (/wp-content/plugins/click-pledge-connect/js/jquery.dataTables.min.js?ver=6.3.1:16:415)\n at e (/wp-content/plugins/click-pledge-connect/js/jquery.dataTables.min.js?ver=6.3.1:92:431)\n at HTMLTableElement.\u003Canonymous> (/wp-content/plugins/click-pledge-connect/js/jquery.dataTables.min.js?ver=6.3.1:93:118)\n at Function.each (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,utils&ver=6.3.1:2:3129)" undefined
    • > GET request to /wp-admin/admin.php?page=cnp_formssettings
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,utils&ver=6.3.1 1:28721 Uncaught TypeError: Cannot set properties of undefined (setting '_DT_CellIndex')

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: forms, connect, click pledge, donation, ecommerce...

click-pledge-connect/clickandpledge_form.php 85% from 13 tests

"Click & Pledge Connect Plugin" version 02.2301020000-WP6.1....'s primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("click-pledge-connect.php" instead of "clickandpledge_form.php")
  • Version: The version number should only use digits and periods (ex. "1.0.3" instead of "02.2301020000-WP6.1....")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin40,561 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript145,1888,00132,349
CSS76311805,246
PHP174641102,965
XML1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions69
▷ Named functions6898.55%
▷ Anonymous functions11.45%
Constants15
▷ Global constants15100.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
14 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo-cp.png5.18KB3.31KB▼ 36.14%
css/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
images/sort_asc.png1.42KB0.97KB▼ 31.38%
css/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.31KB0.18KB▼ 42.95%
css/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%