68% email-capture-lead-generation

Code Review | Email Capture & Lead Generation

WordPress plugin Email Capture & Lead Generation scored68%from 54 tests.

About plugin

  • Plugin page: email-capture-lea...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.9
  • WordPress version: 6.3.1
  • First release: Jan 29, 2020
  • Latest release: May 12, 2022
  • Number of updates: 5
  • Update frequency: every 167.0 days
  • Top authors: wishfulthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active /7,279 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.13MB] [CPU: ▼4.67ms] Passed 4 tests

Analyzing server-side resources used by Email Capture & Lead Generation
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1446.17 ▼0.62
Dashboard /wp-admin3.45 ▲0.1054.46 ▼10.27
Posts /wp-admin/edit.php3.56 ▲0.2057.75 ▲1.82
Add New Post /wp-admin/post-new.php6.04 ▲0.1690.55 ▼9.60
Media Library /wp-admin/upload.php3.37 ▲0.1541.09 ▲3.93
Settings /wp-admin/admin.php?page=eclg-settings3.3433.82
Integration /wp-admin/admin.php?page=eclg-integration3.3437.32
Lists /wp-admin/admin.php?page=eclg-list3.3737.65

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 19 new files
Database: 1 new table, 6 new options
New tables
wp_eclg_subscribers
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Email Capture & Lead Generation
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,960 ▲19916.22 ▲1.635.86 ▲4.2845.76 ▲5.58
Dashboard /wp-admin2,272 ▲957.58 ▲1.91195.46 ▲101.1641.65 ▼2.96
Posts /wp-admin/edit.php2,203 ▲1006.32 ▲4.3269.81 ▲28.7537.15 ▼0.23
Add New Post /wp-admin/post-new.php1,560 ▲2523.50 ▲0.54584.44 ▼5.4939.45 ▼12.99
Media Library /wp-admin/upload.php1,572 ▲1728.55 ▲4.32123.58 ▲16.1642.76 ▼1.95
Settings /wp-admin/admin.php?page=eclg-settings1,0156.9893.1339.01
Integration /wp-admin/admin.php?page=eclg-integration9406.6268.1629.96
Lists /wp-admin/admin.php?page=eclg-list1,0385.8854.4227.50

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_eclg_subscribers
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means 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
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/email-capture-lead-generation/email-capture-lead-generation.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=eclg-settings
    • > Console-api (warning) in wp-includes/js/dist/deprecated.min.js?ver=73ad3591e7bc95f4777a+1:627
    wp.components.ClipboardButton is deprecated since version 5.8. Please use wp.compose.useCopyToClipboard instead.

Optimizations

Plugin configuration 90% 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
9 plugin tags: email newsletter widget, email capture, newsletter subscribe, newsletter signup, subscription...

email-capture-lead-generation/email-capture-lead-generation.php 77% from 13 tests

This is the main PHP file of "Email Capture & Lead Generation" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages")
  • Description: Please keep the plugin description shorter than 140 characters (currently 181 characters long)
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")

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
Good job! No executable or dangerous file extensions detected1,741 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP8284452860
JavaScript520328701
CSS230180

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity28.40
▷ Minimum class complexity4.00
▷ Maximum class complexity55.00
Average method complexity4.67
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods34
▷ Static methods00.00%
▷ Public methods34100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.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