10% newsletters-lite

Code Review | Newsletters

WordPress plugin Newsletters scored10%from 54 tests.

About plugin

  • Plugin page: newsletters-lite
  • Plugin version: 4.9.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.3.1
  • WordPress version: 6.3.1
  • First release: Aug 26, 2014
  • Latest release: Oct 2, 2023
  • Number of updates: 1
  • Update frequency: every 365.0 days

Code review

54 tests

User reviews

240 reviews

Install metrics

3,000+ active /247,572 total downloads

Benchmarks

Plugin footprint 39% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/newsletters-lite/wp-mailinglist.php+3789
    Undefined variable: newsletters_language

Server metrics [RAM: ▲14.14MB] [CPU: ▲93.53ms] 50% from 4 tests

Analyzing server-side resources used by Newsletters
The following require your attention
  • RAM: Try to keep total memory usage under 10MB (currently 18.51MB on /wp-admin/admin.php?page=newsletters-links)
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 14.14MB on /wp-admin/admin.php?page=newsletters-links)
PageMemory (MB)CPU Time (ms)
Home /17.31 ▲13.85134.77 ▲96.00
Dashboard /wp-admin18.34 ▲15.04160.28 ▲112.61
Posts /wp-admin/edit.php18.01 ▲14.66162.38 ▲111.74
Add New Post /wp-admin/post-new.php19.30 ▲13.41144.66 ▲53.78
Media Library /wp-admin/upload.php17.86 ▲14.63166.45 ▲135.16
Upgrade to PRO /wp-admin/admin.php?page=newsletters-lite-upgrade18.27141.16
Groups /wp-admin/admin.php?page=newsletters-groups18.51140.59
Email Queue /wp-admin/admin.php?page=newsletters-queue18.06151.76
System /wp-admin/admin.php?page=newsletters-settings-system22.24176.43
Autoresponders /wp-admin/admin.php?page=newsletters-autoresponders18.80179.43
Save an Email Snippet /wp-admin/admin.php?page=newsletters-templates-save19.03158.34
Subscription Orders /wp-admin/admin.php?page=newsletters-orders18.63159.82
Submit Serial /wp-admin/admin.php?page=newsletters-submitserial17.87133.04
Subscribers /wp-admin/admin.php?page=newsletters-subscribers67.85431.28
Links & Clicks /wp-admin/admin.php?page=newsletters-links18.51136.59

Server storage [IO: ▲24.12MB] [DB: ▲0.20MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 2,528 new files
Database: 31 new tables, 208 new options
New tables
wp_wpmlgroups
wp_wpmlclicks
wp_wpmlfieldsforms
wp_wpmlbounces
wp_wpmllatestpostssubscriptions
wp_wpmlsubscriberslists
wp_wpmlposts
wp_wpmlsubscribersoptions
wp_wpmlforms
wp_wpmlautoresponderslists
...
New WordPress options
wpmlonlinelinktext
wpmlcreatepreview
wpmletsubject_authenticate
wpmlrssfeed
wpmlimportusers
wpmldefaultlistcreated
wpmlcurrencies
wpmlpermissions
wpmlrecaptcha_theme
wpmladminemail
...

Browser metrics Passed 4 tests

Checking browser requirements for Newsletters
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,415 ▲65419.45 ▲5.1066.11 ▲64.6044.80 ▲4.88
Dashboard /wp-admin2,681 ▲5046.44 ▲0.86207.59 ▲121.0746.66 ▲6.61
Posts /wp-admin/edit.php2,560 ▲4572.48 ▲0.5055.67 ▲14.9744.98 ▲8.89
Add New Post /wp-admin/post-new.php2,095 ▲56719.63 ▼3.48655.84 ▲3.8639.57 ▼17.57
Media Library /wp-admin/upload.php1,720 ▲3234.86 ▲0.63107.76 ▲10.8349.90 ▲8.95
Upgrade to PRO /wp-admin/admin.php?page=newsletters-lite-upgrade1,5447.43242.5268.51
Groups /wp-admin/admin.php?page=newsletters-groups1,7725.68102.0435.50
Email Queue /wp-admin/admin.php?page=newsletters-queue1,4335.5495.5736.36
System /wp-admin/admin.php?page=newsletters-settings-system4,1406.24141.5762.30
Autoresponders /wp-admin/admin.php?page=newsletters-autoresponders2,2246.31116.6340.05
Save an Email Snippet /wp-admin/admin.php?page=newsletters-templates-save2,1048.99185.6368.23
Subscription Orders /wp-admin/admin.php?page=newsletters-orders1,9345.6489.4935.94
Submit Serial /wp-admin/admin.php?page=newsletters-submitserial1,3685.2468.0731.22
Subscribers /wp-admin/admin.php?page=newsletters-subscribers3,6776.1297.9937.63
Links & Clicks /wp-admin/admin.php?page=newsletters-links1,7515.6777.3932.67

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie tables detected upon uninstall: 31 tables
    • wp_wpmlmailinglists
    • wp_wpmlhistoriesattachments
    • wp_wpmllatestpostssubscriptions
    • wp_wpmlemails
    • wp_wpmlposts
    • wp_wpmlgroups
    • wp_wpmlhistorieslists
    • wp_wpmlforms
    • wp_wpmlsubscribermetas
    • wp_wpmlautoresponderemails
    • ...
  • Zombie WordPress options detected upon uninstall: 208 options
    • wpmldbversion
    • wpmlmanagementauthtype
    • wpmlcaptcha_rgb
    • wpmlexcerpt_length
    • wpmltheme_usestyle
    • wpmltheme_folder
    • wpmlcommentformlabel
    • wpmlpermissions
    • wpmlcustomcss
    • wpmlprintlinktext
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=newsletters-groups
    • > Notice in wp-content/plugins/newsletters-lite/views/admin/groups/index.php+10
    Undefined variable: groups
    • > GET request to /wp-admin/admin.php?page=newsletters-settings-system
    • > Notice in wp-content/plugins/newsletters-lite/views/admin/metaboxes/settings-importusers.php+105
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/admin.php?page=newsletters-submitserial
    • > Notice in wp-content/plugins/newsletters-lite/wp-mailinglist.php+4628
    Undefined variable: errors
    • > GET request to /wp-admin/admin.php?page=newsletters-submitserial
    • > Notice in wp-content/plugins/newsletters-lite/views/admin/settings-submitserial.php+19
    Undefined index: serial
    • > GET request to /wp-admin/admin.php?page=newsletters-links
    • > Notice in wp-content/plugins/newsletters-lite/wp-mailinglist.php+9212
    Undefined index: Link
    • > GET request to /wp-admin/admin.php?page=newsletters-links
    • > Notice in wp-content/plugins/newsletters-lite/wp-mailinglist.php+9212
    Undefined index: Paginate
    • > GET request to /wp-admin/admin.php?page=newsletters-links
    • > Notice in wp-content/plugins/newsletters-lite/views/admin/links/loop.php+59
    Undefined variable: orde

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 10× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/newsletters-lite/vendors/EmailVerify.class.php
    • > /wp-content/plugins/newsletters-lite/js/ckeditor/samples/old/assets/posteddata.php
    • > /wp-content/plugins/newsletters-lite/vendor/sendgrid/php-http-client/examples/example.php
    • > /wp-content/plugins/newsletters-lite/vendor/mobiledetect/mobiledetectlib/export/exportToJSON.php
    • > /wp-content/plugins/newsletters-lite/views/admin/metaboxes/forms/form.php
    • > /wp-content/plugins/newsletters-lite/views/admin/gdpr.php
    • > /wp-content/plugins/newsletters-lite/views/email/builder-default.php
    • > /wp-content/plugins/newsletters-lite/js/ckeditor/samples/old/sample_posteddata.php
    • > /wp-content/plugins/newsletters-lite/views/email/preview.php
    • > /wp-content/plugins/newsletters-lite/views/admin/history/loop.php
  • 884× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Client\\Common\\Plugin' not found in wp-content/plugins/newsletters-lite/vendor/php-http/client-common/src/Plugin/AddPathPlugin.php:17
    • > PHP Warning
      require_once(src/ellipticcurve.php): failed to open stream: No such file or directory in wp-content/plugins/newsletters-lite/vendor/starkbank/ecdsa/tests/test.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/newsletters-lite/views/admin/metaboxes/settings-pp.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/newsletters-lite/views/admin/orders/index.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bloginfo() in wp-content/plugins/newsletters-lite/views/email/head.php:6
    • > PHP Notice
      Undefined index: page in wp-content/plugins/newsletters-lite/views/admin/emails/loop.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/newsletters-lite/views/default2/js/management.php:31
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Message\\Authentication' not found in wp-content/plugins/newsletters-lite/vendor/php-http/message/src/Authentication/BasicAuth.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/newsletters-lite/vendor/guzzlehttp/promises/src/FulfilledPromise.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Message\\Authentication' not found in wp-content/plugins/newsletters-lite/vendor/php-http/message/src/Authentication/Chain.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=newsletters-lite-upgrade
    • > Other (severe) in unknown
    chrome-error://chromewebdata/ - Refused to display 'https://developers.google.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 24 tag instead of maximum 10
The official readme.txt is a good inspiration

newsletters-lite/wp-mailinglist.php 77% from 13 tests

The principal PHP file in "Newsletters" v. 4.9.4 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("newsletters-lite.php" instead of "wp-mailinglist.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: The description should be shorter than 140 characters (currently 351 characters long)

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected248,839 lines of code in 1,796 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,18029,45848,851154,213
CSS569,12183444,852
JavaScript2974,2703,43619,437
Markdown1205,033013,567
HTML519702167,106
JSON49105,005
SVG7223,782
YAML218920535
XML94880276
Dockerfile317030
Perl171218
make15011
Bourne Shell1207

PHP code 0% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please tend to the following items
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 2,562)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 343)
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity22.95
▷ Minimum class complexity1.00
▷ Maximum class complexity2,562.00
Average method complexity4.13
▷ Minimum method complexity1.00
▷ Maximum method complexity343.00
Code structure
Namespaces126
Interfaces66
Traits24
Classes743
▷ Abstract classes192.56%
▷ Concrete classes72497.44%
▷ Final classes23131.91%
Methods5,958
▷ Static methods82413.83%
▷ Public methods4,99983.90%
▷ Protected methods4427.42%
▷ Private methods5178.68%
Functions348
▷ Named functions13338.22%
▷ Anonymous functions21561.78%
Constants659
▷ Global constants25939.30%
▷ Class constants40060.70%
▷ Public constants38997.25%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
441 PNG files occupy 1.01MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
views/default/img/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
js/ckeditor/plugins/icons_hidpi.png37.33KB15.25KB▼ 59.15%
images/flags/ye.png0.15KB0.15KB0.00%
images/flags/tg.png0.63KB0.64KB0.00%
images/flags/bt.png4.14KB2.53KB▼ 38.91%