68% email-subscription-with-secure-captcha

Code Review | Easy Email Subscription

WordPress plugin Easy Email Subscription scored68%from 54 tests.

About plugin

  • Plugin page: email-subscriptio...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.1-6.2
  • WordPress version: 6.3.1
  • First release: Jan 8, 2015
  • Latest release: Mar 30, 2023
  • Number of updates: 42
  • Update frequency: every 71.8 days
  • Top authors: yudiz (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /4,012 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.07MB] [CPU: ▼6.93ms] Passed 4 tests

Analyzing server-side resources used by Easy Email Subscription
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0840.48 ▲4.47
Dashboard /wp-admin3.39 ▲0.0446.35 ▼14.02
Posts /wp-admin/edit.php3.44 ▲0.0844.20 ▼7.73
Add New Post /wp-admin/post-new.php5.97 ▲0.0887.55 ▼6.45
Media Library /wp-admin/upload.php3.31 ▲0.0836.87 ▲0.48
Edit Selected Subscription /wp-admin/admin.php?page=edit-subscription3.2631.84

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 26 new files
Database: 1 new table, 9 new options
New tables
wp_sies_emails
New WordPress options
db_upgraded
can_compress_scripts
widget_sieswidget
theysaidso_admin_options
widget_recent-posts
sies_db_version
sies_per_page
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Easy Email Subscription
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8414.63 ▲0.271.97 ▲0.4242.67 ▼1.20
Dashboard /wp-admin2,214 ▲345.58 ▼0.0781.93 ▼3.4836.96 ▼4.78
Posts /wp-admin/edit.php2,116 ▲161.98 ▼0.0638.73 ▲2.8735.11 ▼0.91
Add New Post /wp-admin/post-new.php1,541 ▲1523.03 ▼0.03670.31 ▼3.7258.51 ▼4.07
Media Library /wp-admin/upload.php1,416 ▲164.21 ▲0.0495.28 ▼0.9239.54 ▼5.63
Edit Selected Subscription /wp-admin/admin.php?page=edit-subscription1,4582.4126.0029.41

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_sies_emails
  • Zombie WordPress options detected upon uninstall: 9 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • sies_db_version
    • sies_per_page
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_sieswidget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=edit-subscription
    • > Notice in wp-content/plugins/email-subscription-with-secure-captcha/simple-email-subscription.php+241
    Undefined index: action
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit-subscription
    • > Notice in wp-content/plugins/email-subscription-with-secure-captcha/simple-email-subscription.php+293
    Undefined offset: 0
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit-subscription
    • > Notice in wp-content/plugins/email-subscription-with-secure-captcha/simple-email-subscription.php+293
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=edit-subscription
    • > User notice in wp-includes/functions.php+5905
    Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)

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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/email-subscription-with-secure-captcha/simple-email-subscription.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/email-subscription-with-secure-captcha/subscriber-form.php:94

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: email subscription, email subscribers, email subscription with captcha, simple email subscription, captcha

email-subscription-with-secure-captcha/simple-email-subscription.php 92% from 13 tests

This is the main PHP file of "Easy Email Subscription" version 1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("email-subscription-with-secure-captcha.php" instead of "simple-email-subscription.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin1,711 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS335501,237
PHP29957416
JavaScript315558

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
16 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/deleteicon.png10.04KB4.62KB▼ 54.02%
jquery-ui/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
jquery-ui/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
jquery-ui/images/ui-bg_gloss-wave_35_f6a828_500x100.png5.68KB1.83KB▼ 67.77%
jquery-ui/images/ui-icons_ef8c08_256x240.png4.44KB4.17KB▼ 6.02%