83% clicksend-lead-capture-form

Code Review | ClickSend Lead Capture Form

WordPress plugin ClickSend Lead Capture Form scored83%from 54 tests.

About plugin

  • Plugin page: clicksend-lead-ca...
  • Plugin version: 1.0.10
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 23, 2017
  • Latest release: Feb 26, 2021
  • Number of updates: 43
  • Update frequency: every 37.1 days
  • Top authors: clicksend (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /2,754 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.37ms] Passed 4 tests

This is a short check of server-side resources used by ClickSend Lead Capture Form
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.89 ▲0.55
Dashboard /wp-admin3.32 ▲0.0250.23 ▼6.21
Posts /wp-admin/edit.php3.38 ▲0.0247.78 ▼3.79
Add New Post /wp-admin/post-new.php5.91 ▲0.0287.85 ▼12.01
Media Library /wp-admin/upload.php3.25 ▲0.0240.21 ▲4.56

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for ClickSend Lead Capture Form
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,886 ▲12513.39 ▼1.179.39 ▲7.3842.69 ▼4.26
Dashboard /wp-admin2,204 ▲305.60 ▲0.0283.81 ▼4.4239.90 ▼4.68
Posts /wp-admin/edit.php2,109 ▲62.02 ▼0.0136.19 ▼4.2534.54 ▼5.60
Add New Post /wp-admin/post-new.php1,538 ▲323.50 ▲5.22696.45 ▲75.0563.44 ▼2.76
Media Library /wp-admin/upload.php1,412 ▲124.19 ▼0.04110.30 ▲3.7447.82 ▼0.46

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/clicksend-lead-capture-form/trunk/views/form.php:20
    • > PHP Notice
      Undefined variable: errors in wp-content/plugins/clicksend-lead-capture-form/trunk/views/form.php on line 8
    • > PHP Notice
      Undefined variable: success_message in wp-content/plugins/clicksend-lead-capture-form/trunk/views/form.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/clicksend-lead-capture-form/trunk/views/configuration.php:2
    • > PHP Notice
      Undefined variable: success_message in wp-content/plugins/clicksend-lead-capture-form/views/form.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/clicksend-lead-capture-form/views/form.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/clicksend-lead-capture-form/views/configuration.php:2
    • > PHP Notice
      Undefined variable: errors in wp-content/plugins/clicksend-lead-capture-form/views/form.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === clicksend-lead-capture-form === )
The official readme.txt is a good inspiration

clicksend-lead-capture-form/clicksend-leadcapture.php 92% from 13 tests

"ClickSend Lead Capture Form" version 1.0.10'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 ("clicksend-lead-capture-form.php" instead of "clicksend-leadcapture.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,557 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity30.00
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity7.30
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
▷ Static methods3678.26%
▷ Public methods46100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions4100.00%
▷ Anonymous functions00.00%
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.68MB with 0.59MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png37.02KB4.22KB▼ 88.60%
trunk/assets/screenshot-1.png37.02KB4.22KB▼ 88.60%
assets/screenshot-2.png312.18KB46.77KB▼ 85.02%
trunk/assets/screenshot-2.png312.18KB46.77KB▼ 85.02%