10% emails-no-spam

Code Review | Emails No Spam

WordPress plugin Emails No Spam scored10%from 54 tests.

About plugin

  • Plugin page: emails-no-spam
  • Plugin version: 2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.7.3
  • WordPress version: 6.3.1
  • First release: Aug 28, 2018
  • Latest release: Nov 2, 2020
  • Number of updates: 412
  • Update frequency: every 1.9 days
  • Top authors: clodoaldoevangelista (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /6,956 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/emails-no-spam/EmailsNoSpam_OptionsManager.php+23
    Undefined index: OptionName

Server metrics [RAM: ▼1.74MB] [CPU: ▼59.79ms] Passed 4 tests

A check of server-side resources used by Emails No Spam
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.26 ▼1.215.82 ▼41.05
Dashboard /wp-admin2.28 ▼1.076.42 ▼58.65
Posts /wp-admin/edit.php2.28 ▼1.086.77 ▼45.04
Add New Post /wp-admin/post-new.php2.28 ▼3.616.84 ▼94.43
Media Library /wp-admin/upload.php2.28 ▼0.957.22 ▼31.22
Emails No Spam /wp-admin/plugins.php?page=EmailsNoSpam_PluginSettings2.286.42

Server storage [IO: ▲1.01MB] [DB: ▲0.02MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 153 new files
Database: 3 new tables, 15 new options
New tables
wp_my_lists
wp_my_recipients
wp_my_servers
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
my_token_ens
widget_theysaidso_widget
widget_recent-posts
EmailsNoSpam_Plugin_WebServervice
my_licence_begin_ens
EmailsNoSpam_Plugin__version
EmailsNoSpam_Plugin__installed
...

Browser metrics Passed 4 tests

Emails No Spam: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,979 ▲21813.49 ▼1.047.89 ▲6.0441.24 ▼3.41
Dashboard /wp-admin2,203 ▲235.59 ▼0.0288.27 ▼12.8239.42 ▼3.70
Posts /wp-admin/edit.php2,381 ▲2811.97 ▼0.0439.68 ▼0.0037.99 ▲1.79
Add New Post /wp-admin/post-new.php1,536 ▲322.88 ▲0.23685.99 ▲15.6758.11 ▲3.17
Media Library /wp-admin/upload.php1,414 ▲144.20 ▼0.01101.01 ▼9.6644.11 ▼3.36
Emails No Spam /wp-admin/plugins.php?page=EmailsNoSpam_PluginSettings1,2122.0526.9233.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/emails-no-spam/EmailsNoSpam_OptionsManager.php+23
    Undefined index: OptionName
  • The uninstall procedure failed, leaving 3 tables in the database
    • wp_my_servers
    • wp_my_lists
    • wp_my_recipients
  • Zombie WordPress options were found after uninstall: 15 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • EmailsNoSpam_Plugin_SelectService
    • EmailsNoSpam_Plugin__version
    • my_token_ens
    • my_licence_type_ens
    • widget_theysaidso_widget
    • EmailsNoSpam_Plugin__installed
    • db_upgraded
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/plugins.php?page=EmailsNoSpam_PluginSettings
    • > Notice in wp-content/plugins/emails-no-spam/EmailsNoSpam_OptionsManager.php+23
    Undefined index: OptionName
    • > GET request to /wp-admin/plugins.php?page=EmailsNoSpam_PluginSettings
    • > Notice in wp-content/plugins/emails-no-spam/EmailsNoSpam_OptionsManager.php+28
    Undefined index: Value
    • > GET request to /wp-admin/plugins.php?page=EmailsNoSpam_PluginSettings
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the email-no-spam-style-unic handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/plugins.php?page=EmailsNoSpam_PluginSettings
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the my-ajax-handle handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 22× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/emails-no-spam/scripts/my-lists/reset-list-form.php
    • > /wp-content/plugins/emails-no-spam/scripts/tables/manager-fields.php
    • > /wp-content/plugins/emails-no-spam/scripts/my-lists/clear-list-done.php
    • > /wp-content/plugins/emails-no-spam/scripts/list-recipients/list-unsubscribe.php
    • > /wp-content/plugins/emails-no-spam/scripts/my-lists/schedule-list-done.php
    • > /wp-content/plugins/emails-no-spam/scripts/common/format.php
    • > /wp-content/plugins/emails-no-spam/scripts/my-lists/clear-list-form.php
    • > /wp-content/plugins/emails-no-spam/scripts/list-recipients/list-recipients.php
    • > /wp-content/plugins/emails-no-spam/scripts/send-list/cron.php
    • > /wp-content/plugins/emails-no-spam/scripts/my-lists/cron.php
  • 67× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_var() on null in wp-content/plugins/emails-no-spam/create_pages/EmailsNoSpam_Tables_Manager_Fields.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'EmailsNoSpam_ShortCodeLoader' not found in wp-content/plugins/emails-no-spam/shortcodes/EmailsNoSpam_Servers_Include_Servers_ShortCode.php:2
    • > PHP Notice
      Undefined index: OptionName in wp-content/plugins/emails-no-spam/EmailsNoSpam_OptionsManager.php on line 23
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_var() on null in wp-content/plugins/emails-no-spam/create_pages/EmailsNoSpam_Servers_List_Servers.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'EmailsNoSpam_ShortCodeLoader' not found in wp-content/plugins/emails-no-spam/shortcodes/EmailsNoSpam_Servers_Reset_Servers_ShortCode.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'EmailsNoSpam_ShortCodeLoader' not found in wp-content/plugins/emails-no-spam/shortcodes/EmailsNoSpam_List_Csv_Example_ShortCode.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/emails-no-spam/pages/about.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'EmailsNoSpam_ShortCodeLoader' not found in wp-content/plugins/emails-no-spam/shortcodes/EmailsNoSpam_New_List_New_List_ShortCode.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'EmailsNoSpam_ShortCodeLoader' not found in wp-content/plugins/emails-no-spam/shortcodes/EmailsNoSpam_Login_Checkout_ShortCode.php:2
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_var() on null in wp-content/plugins/emails-no-spam/create_pages/EmailsNoSpam_New_List_New_List.php: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 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (Enable the ENS Menu created during the plugin installation.), #2 (Build your list of recipients. Something like Campaign # 1 ...), #3 (Upload the csv file containing the recipients. If you need to download the example recipients.csv.), #4 (Select the post you want to send to your list recipients. Remember the post you wrote on your Worpress and saved it with Private status. Done! Now it's just you shoot the messages ... Ah! Do not forget to configure the Server.)
  • Tags: Too many tags (17 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

emails-no-spam/emails-no-spam.php 92% from 13 tests

The main PHP script in "Emails No Spam" version 2.7 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 145 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected8,297 lines of code in 136 files:
LanguageFilesBlank linesComment linesLines of code
PHP1332,4631,1777,642
JavaScript210013602
CSS16253

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity3.04
▷ Minimum class complexity1.00
▷ Maximum class complexity45.00
Average method complexity1.58
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes27
▷ Abstract classes27.41%
▷ Concrete classes2592.59%
▷ Final classes00.00%
Methods93
▷ Static methods00.00%
▷ Public methods6569.89%
▷ Protected methods2830.11%
▷ Private methods00.00%
Functions32
▷ Named functions2784.38%
▷ Anonymous functions515.62%
Constants9
▷ Global constants777.78%
▷ Class constants222.22%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
10 PNG files occupy 0.63MB with 0.45MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png25.11KB9.48KB▼ 62.23%
imagens/opcoes-csv-libre-office.PNG12.18KB6.33KB▼ 48.04%
imagens/recipients-csv-libre-office.PNG96.14KB33.78KB▼ 64.87%
assets/icon-128x128.png42.89KB3.70KB▼ 91.37%
assets/icon-256x256.png59.38KB7.00KB▼ 88.21%