10% wp-email-newsletter

Code Review | Wordpress Email Newsletter

WordPress plugin Wordpress Email Newsletter scored10%from 54 tests.

About plugin

  • Plugin page: wp-email-newsletter
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.4.2
  • WordPress version: 6.3.1
  • First release: Jan 22, 2015
  • Latest release: Mar 8, 2016
  • Number of updates: 11
  • Update frequency: every 37.4 days
  • Top authors: tushal304 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /4,943 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/wp-email-newsletter/wpm_functions.php+135
    Use of undefined constant mail_plugin_url - assumed 'mail_plugin_url' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼0.09MB] [CPU: ▼14.52ms] Passed 4 tests

This is a short check of server-side resources used by Wordpress Email Newsletter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0944.32 ▲0.50
Dashboard /wp-admin3.25 ▼0.0533.53 ▼16.58
Posts /wp-admin/edit.php3.34 ▼0.0236.35 ▼27.73
Add New Post /wp-admin/post-new.php5.54 ▼0.3583.44 ▼9.69
Media Library /wp-admin/upload.php3.27 ▲0.0530.53 ▼4.07
Compose Mail /wp-admin/admin.php?page=compose-email3.1925.63
Mail to Subscriber /wp-admin/admin.php?page=sendmail-subscriber3.1928.29
View Subscriber /wp-admin/admin.php?page=view-subscriber3.1929.20
Setup Unsubscribe /wp-admin/admin.php?page=unsubscribe-setting3.1929.87
Setup Widget /wp-admin/admin.php?page=widget-setting3.1927.33
Setup Email /wp-admin/admin.php?page=email-setting3.1926.40
General Information /wp-admin/admin.php?page=general-information3.1926.35

Server storage [IO: ▲0.28MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 30 new files
Database: 2 new tables, 38 new options
New tables
wp_wmail_newsletter_list
wp_wmail_newsletter
New WordPress options
wmail_msgdis_1
wmail_widget_but_cap
wmail_title
wmail_un_option
wmail_on_search
theysaidso_admin_options
wmail_opt_subject
wmail_admin_email_option
wmail_from_email
wmail_bcc
...

Browser metrics Passed 4 tests

An overview of browser requirements for Wordpress Email Newsletter
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,874 ▲11315.37 ▲0.811.73 ▼0.0345.88 ▼2.76
Dashboard /wp-admin2,283 ▲806.57 ▲1.71129.14 ▲9.1944.31 ▼4.11
Posts /wp-admin/edit.php2,310 ▲2103.34 ▲1.3548.95 ▲9.6034.84 ▼1.85
Add New Post /wp-admin/post-new.php1,584 ▲3922.26 ▼0.79663.54 ▼27.3253.86 ▼3.74
Media Library /wp-admin/upload.php1,610 ▲2105.02 ▲0.81111.76 ▲6.9744.44 ▲0.03
Compose Mail /wp-admin/admin.php?page=compose-email1,1262.9740.0327.63
Mail to Subscriber /wp-admin/admin.php?page=sendmail-subscriber1,1102.9838.3527.41
View Subscriber /wp-admin/admin.php?page=view-subscriber1,1492.9739.7126.23
Setup Unsubscribe /wp-admin/admin.php?page=unsubscribe-setting2,57110.62211.08112.28
Setup Widget /wp-admin/admin.php?page=widget-setting1,0873.0140.3426.69
Setup Email /wp-admin/admin.php?page=email-setting1,2083.0742.6628.43
General Information /wp-admin/admin.php?page=general-information1,1593.1141.5135.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie tables were found after uninstall: 2 tables
    • wp_wmail_newsletter
    • wp_wmail_newsletter_list
  • This plugin does not fully uninstall, leaving 38 options in the database
    • wmail_admin_email_option
    • wmail_on_homepage
    • wmail_from_email
    • wmail_un_link
    • wmail_opt_subject
    • wmail_msgdis_6
    • wmail_title
    • wmail_msgdis_5
    • wmail_widget_txt_cap
    • wmail_on_posts
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=general-information
    • > User deprecated in wp-includes/functions.php+5453
    Function wp_tiny_mce is deprecated since version 3.3.0! Use wp_editor() instead.
    • > GET request to /wp-admin/admin.php?page=sendmail-subscriber
    • > Notice in wp-content/plugins/wp-email-newsletter/sendemail/sendmail-subscriber.php+141
    Undefined variable: wmail_subject_drop_val
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=email-setting
    • > Notice in wp-content/plugins/wp-email-newsletter/pages/email-setting.php+22
    Undefined index: wmail_submit

SRP 0% 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
  • 13× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/wp-email-newsletter/pages/widget-setting.php
    • > /wp-content/plugins/wp-email-newsletter/subscriber/view-subscriber-show.php
    • > /wp-content/plugins/wp-email-newsletter/subscriber/view-subscriber-edit.php
    • > /wp-content/plugins/wp-email-newsletter/sendemail/steps.php
    • > /wp-content/plugins/wp-email-newsletter/pages/unsubscribe-setting.php
    • > /wp-content/plugins/wp-email-newsletter/subscriber/view-subscriber-add.php
    • > /wp-content/plugins/wp-email-newsletter/pages/email-setting.php
    • > /wp-content/plugins/wp-email-newsletter/compose/compose-email-edit.php
    • > /wp-content/plugins/wp-email-newsletter/pages/welcome-page.php
    • > /wp-content/plugins/wp-email-newsletter/widget/wmail_subscribe.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mail_plugin_url() in wp-content/plugins/wp-email-newsletter/widget/widget.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-email-newsletter/wpm_functions.php:13
    • > PHP Warning
      require_once(wp-content/plugins/wp-email-newsletter/unsubscribe..\\..\\..\\..\\..\\wp-config.php): failed to open stream: No such file or directory in wp-content/plugins/wp-email-newsletter/unsubscribe/unsubscribe.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/wp-email-newsletter/unsubscribe..\\..\\..\\..\\..\\wp-config.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-email-newsletter/unsubscribe/unsubscribe.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Create Custom Body for sent email to subscribe user), #2 (custom widget Name ,Label Name ,Button Name for display on site), #3 (Email Setting for send email to user.), #4 (create unsubscribe email body or message)
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
You can look at the official readme.txt

wp-email-newsletter/wpm_functions.php 85% from 13 tests

The principal PHP file in "Wordpress Email Newsletter" v. 1.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-email-newsletter.php" instead of "wpm_functions.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
There were no executable files found in this plugin2,693 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP16176761,907
JavaScript64817478
CSS31010308

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.17MB with 0.07MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png53.72KB32.59KB▼ 39.33%
screenshot-2.png26.41KB16.43KB▼ 37.78%
screenshot-4.png72.43KB41.45KB▼ 42.77%
screenshot-1.png25.70KB15.21KB▼ 40.82%