10% ultimate-newsletter

Code Review | Ultimate Newsletter

WordPress plugin Ultimate Newsletter scored 10% from 54 tests.

About plugin

  • Plugin page: ultimate-newsletter
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-4.7.3
  • WordPress version: 5.8.1
  • First release: Nov 12, 2016
  • Latest release: Mar 18, 2017
  • Number of updates: 7
  • Update frequency: every 17.4 days
  • Top authors: Yendif Player (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active / 4,762 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/ultimate-newsletter/widgets/subscription-form/subscription-form.php+265
    Function create_function() is deprecated

Server metrics [RAM: ▼1.13MB] [CPU: ▼189.59ms] Passed 4 tests

This is a short check of server-side resources used by Ultimate Newsletter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.50 ▼0.2210.73 ▼16.90
Dashboard /wp-admin2.52 ▼0.548.97 ▼33.77
Posts /wp-admin/edit.php2.52 ▼0.599.23 ▼38.56
Add New Post /wp-admin/post-new.php2.52 ▼2.9210.51 ▼653.32
Media Library /wp-admin/upload.php2.52 ▼0.488.69 ▼32.71
Subscribers /wp-admin/admin.php?page=un_subscribers2.518.54
All Newsletters /wp-admin/admin.php?page=ultimate_newsletters2.5110.08
Email Groups /wp-admin/edit-tags.php?taxonomy=un_email_groups&post_type=ultimate_newsletters2.528.71
Settings /wp-admin/admin.php?page=un_settings2.5110.52

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 77 new files
Database: no new tables, 8 new options
New WordPress options
un_signup_confirmation_settings
widget_ultimate-newsletter-widget-subscription-form
un_subscriber_wp_users
un_email_smtp_settings
un_version
un_general_settings
un_email_throttling_settings
un_email_settings

Browser metrics Passed 4 tests

Ultimate Newsletter: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,954 ▲35817.90 ▲2.407.98 ▲0.3247.77 ▼0.39
Dashboard /wp-admin3,245 ▲3147.49 ▲1.55174.27 ▲17.30118.83 ▼5.42
Posts /wp-admin/edit.php3,043 ▲3044.08 ▲1.39100.00 ▲26.5691.52 ▼1.84
Add New Post /wp-admin/post-new.php1,557 ▼2418.47 ▼2.10352.49 ▼33.08120.87 ▲5.65
Media Library /wp-admin/upload.php1,889 ▲825.07 ▲0.06126.91 ▼22.79131.21 ▲0.11
Subscribers /wp-admin/admin.php?page=un_subscribers1,8024.36104.1074.27
All Newsletters /wp-admin/admin.php?page=ultimate_newsletters1,8444.3684.9877.60
Email Groups /wp-admin/edit-tags.php?taxonomy=un_email_groups&post_type=ultimate_newsletters2,0374.6187.2193.73
Settings /wp-admin/admin.php?page=un_settings1,6004.10103.7689.83

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/ultimate-newsletter/widgets/subscription-form/subscription-form.php+265
    Function create_function() is deprecated
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_ultimate-newsletter-widget-subscription-form

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)
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=un_settings
    • > Deprecated in wp-content/plugins/ultimate-newsletter/widgets/subscription-form/subscription-form.php+265
    Function create_function() is deprecated
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=un_settings
    • > Notice in wp-includes/class.wp-scripts.php+343
    Array to string conversion

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/ultimate-newsletter/admin/partials/newsletters/ultimate-newsletter-builder-elements.php
    • > /wp-content/plugins/ultimate-newsletter/widgets/subscription-form/views/widget.php
  • 29× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/ultimate-newsletter/admin/partials/subscribers/ultimate-newsletter-subscriber-form.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ultimate-newsletter/admin/partials/newsletters/ultimate-newsletter-builder.php:11
    • > PHP Notice
      Undefined variable: widget_id in wp-content/plugins/ultimate-newsletter/widgets/subscription-form/views/widget.php on line 24
    • > PHP Notice
      Undefined variable: email_label in wp-content/plugins/ultimate-newsletter/widgets/subscription-form/views/widget.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ultimate-newsletter/public/partials/ultimate-newsletter-subscriber-profile.php:16
    • > PHP Warning
      Use of undefined constant ULTIMATE_NEWSLETTER_PLUGIN_URL - assumed 'ULTIMATE_NEWSLETTER_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/ultimate-newsletter/admin/partials/newsletters/ultimate-newsletter-builder-elements.php on line 293
    • > PHP Notice
      Undefined variable: has_name in wp-content/plugins/ultimate-newsletter/widgets/subscription-form/views/widget.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ultimate-newsletter/public/partials/ultimate-newsletter-unsubscribe-confirm.php:9
    • > PHP Warning
      implode(): Invalid arguments passed in wp-content/plugins/ultimate-newsletter/widgets/subscription-form/views/widget.php on line 23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ultimate-newsletter/admin/partials/subscribers/ultimate-newsletter-import-list.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt is a good inspiration

ultimate-newsletter/ultimate-newsletter.php Passed 13 tests

The entry point to "Ultimate Newsletter" version 1.2.0 is a PHP file that has certain tags in its header comment area
113 characters long description:
Easy to use WordPress newsletter plugin. Send professional email newsletters and manage subscribers in WordPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin8,258 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
PHP351,8082,0766,235
JavaScript2472115939
CSS416230789
HTML117130285
JSON11010

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity33.59
▷ Minimum class complexity1.00
▷ Maximum class complexity108.00
Average method complexity4.04
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes00.00%
Methods184
▷ Static methods158.15%
▷ Public methods14076.09%
▷ Protected methods42.17%
▷ Private methods4021.74%
Functions21
▷ Named functions1780.95%
▷ Anonymous functions419.05%
Constants16
▷ Global constants531.25%
▷ Class constants1168.75%
▷ Public constants11100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/facebook.png0.94KB0.61KB▼ 34.76%
public/images/twitter.png1.06KB0.74KB▼ 30.18%
public/images/gplus.png1.25KB1.06KB▼ 15.01%
templates/one-column/screenshot.png0.43KB0.43KB0.00%
public/images/image-placeholder.png3.41KB1.73KB▼ 49.21%