73% wp-email-capture

Code Review | WordPress Email Marketing Plugin - WP Email Capture

WordPress plugin WordPress Email Marketing Plugin - WP Email Capture scored73%from 54 tests.

About plugin

  • Plugin page: wp-email-capture
  • Plugin version: 3.12
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Sep 17, 2009
  • Latest release: Oct 18, 2023
  • Number of updates: 164
  • Update frequency: every 31.4 days
  • Top authors: rhyswynne (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

3,000+ active /286,246 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.44MB] [CPU: ▲0.68ms] 75% from 4 tests

A check of server-side resources used by WordPress Email Marketing Plugin - WP Email Capture
It is recommended to improve the following
  • CPU: Total CPU usage must kept under 500.00ms (currently 2,971.99ms on /wp-admin/admin.php?page=wpemailcapturefreehelp)
PageMemory (MB)CPU Time (ms)
Home /3.92 ▲0.4543.13 ▲2.05
Dashboard /wp-admin3.75 ▲0.4552.73 ▲3.91
Posts /wp-admin/edit.php3.87 ▲0.5048.49 ▲3.75
Add New Post /wp-admin/post-new.php6.33 ▲0.4484.05 ▼4.65
Media Library /wp-admin/upload.php3.67 ▲0.4436.63 ▲1.55
WP Email Capture /wp-admin/admin.php?page=wpemailcapture3.6433.22
Help /wp-admin/admin.php?page=wpemailcapturefreehelp4.782,971.99
Settings /wp-admin/admin.php?page=wpemailcapturefreesettings4.1241.81

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 63 new files
Database: 2 new tables, 9 new options
New tables
wp_wp_email_capture_registered_members
wp_wp_email_capture_temp_members
New WordPress options
widget_recent-comments
theysaidso_admin_options
wp_email_capture_from
widget_theysaidso_widget
wp_email_capture_db_version
can_compress_scripts
widget_wp_email_capture_widget_class
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WordPress Email Marketing Plugin - WP Email Capture
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲13814.48 ▼0.161.76 ▼0.2644.23 ▼0.97
Dashboard /wp-admin2,291 ▲1145.62 ▲0.0989.87 ▼13.2479.20 ▲37.35
Posts /wp-admin/edit.php2,123 ▲231.95 ▼0.0233.73 ▼4.1732.52 ▼4.65
Add New Post /wp-admin/post-new.php6,221 ▲4,69226.39 ▲2.66847.46 ▲177.5437.11 ▼15.58
Media Library /wp-admin/upload.php1,423 ▲234.18 ▼0.0095.32 ▲1.4672.84 ▲28.55
WP Email Capture /wp-admin/admin.php?page=wpemailcapture1,4352.0128.6759.18
Help /wp-admin/admin.php?page=wpemailcapturefreehelp1,1762.1425.0539.09
Settings /wp-admin/admin.php?page=wpemailcapturefreesettings1,3201.6923.7129.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_wp_email_capture_registered_members
    • wp_wp_email_capture_temp_members
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • wp_email_capture_from
    • wp_email_capture_db_version
    • db_upgraded
    • widget_recent-posts
    • widget_wp_email_capture_widget_class
    • widget_recent-comments
    • can_compress_scripts
    • 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)
Good news, no errors were detected

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
Please take a closer look at the following
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-email-capture/wp-email-capture.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-email-capture/inc/widget.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-email-capture/inc/options.php:729
    • > PHP Warning
      require_once(WP_EMAIL_CAPTURE_PATH/inc/functions.php): failed to open stream: No such file or directory in wp-content/plugins/wp-email-capture/inc/core.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-email-capture/inc/functions.php:399
    • > PHP Warning
      Use of undefined constant WP_EMAIL_CAPTURE_PATH - assumed 'WP_EMAIL_CAPTURE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-email-capture/inc/core.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-email-capture/inc/help.php:74
    • > PHP Fatal error
      require_once(): Failed opening required 'WP_EMAIL_CAPTURE_PATH/inc/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-email-capture/inc/core.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The Dashboard Widget), #2 (The Options Page), #3 (It's appearance within the template)
You can look at the official readme.txt

wp-email-capture/wp-email-capture.php 92% from 13 tests

Analyzing the main PHP file in "WordPress Email Marketing Plugin - WP Email Capture" version 3.12
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 326 characters long)

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
No dangerous file extensions were detected4,001 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
PHP231,1657822,185
PO File95598231,442
JavaScript4117158
CSS4200124
Markdown131092

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity9.67
▷ Minimum class complexity3.00
▷ Maximum class complexity13.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16.25%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions75
▷ Named functions75100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
11 PNG files occupy 0.30MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/WP-EC-262-x-218.png54.12KB21.44KB▼ 60.38%
inc/img/drip-image.png4.71KB2.41KB▼ 48.71%
images/WP-EC-336-x-280.png59.36KB30.14KB▼ 49.22%
inc/img/redirect-if-present.png16.94KB5.57KB▼ 67.13%
screenshot-1.png18.96KB8.26KB▼ 56.42%