78% newsletter-email-mailing-list

Code Review | Newsletter

WordPress plugin Newsletter scored78%from 54 tests.

About plugin

  • Plugin page: newsletter-email-...
  • Plugin version: 2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8.1
  • WordPress version: 6.3.1
  • First release: Oct 29, 2015
  • Latest release: Oct 12, 2021
  • Number of updates: 57
  • Update frequency: every 38.3 days
  • Top authors: s-feeds (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

20+ active /7,474 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▲3.05ms] Passed 4 tests

A check of server-side resources used by Newsletter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1646.95 ▲5.59
Dashboard /wp-admin3.44 ▲0.1453.85 ▲2.89
Posts /wp-admin/edit.php3.49 ▲0.1455.96 ▲3.69
Add New Post /wp-admin/post-new.php5.98 ▲0.09104.15 ▲0.03
Media Library /wp-admin/upload.php3.30 ▲0.0741.15 ▲7.29

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 158 new files
Database: no new tables, 17 new options
New WordPress options
can_compress_scripts
un_section1_options
widget_theysaidso_widget
un_redirect_url
db_upgraded
un_RatingDiv
un_section2_options
un_pluginVersion
un_feed_id
widget_subscriber_form_widget
...

Browser metrics Passed 4 tests

A check of browser resources used by Newsletter
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,316 ▲55516.72 ▲2.37110.03 ▲108.3344.37 ▼2.60
Dashboard /wp-admin2,474 ▲2975.67 ▲0.0286.35 ▼5.6879.32 ▲39.02
Posts /wp-admin/edit.php2,403 ▲3032.03 ▼0.0141.14 ▲2.3048.67 ▲10.56
Add New Post /wp-admin/post-new.php1,878 ▲34322.40 ▲4.29701.79 ▲23.1461.41 ▼4.66
Media Library /wp-admin/upload.php1,679 ▲2794.18 ▲0.02105.68 ▼1.3090.44 ▲45.39

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 11 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • analyst_cache
    • un_sf_count
    • un_installDate
    • theysaidso_admin_options
    • widget_subscriber_form_widget
    • db_upgraded
    • un_RatingDiv
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 8× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/newsletter-email-mailing-list/analyst/templates/optout.php
    • > /wp-content/plugins/newsletter-email-mailing-list/analyst/templates/forms/deactivate.php
    • > /wp-content/plugins/newsletter-email-mailing-list/css/jquery-ui-1.10.4/index.php
    • > /wp-content/plugins/newsletter-email-mailing-list/css/images/index.php
    • > /wp-content/plugins/newsletter-email-mailing-list/analyst/templates/optin.php
    • > /wp-content/plugins/newsletter-email-mailing-list/images/index.php
    • > /wp-content/plugins/newsletter-email-mailing-list/analyst/templates/forms/install.php
    • > /wp-content/plugins/newsletter-email-mailing-list/css/jquery-ui-1.10.4/images/index.php
  • 35× 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 add_action() in wp-content/plugins/newsletter-email-mailing-list/libs/un_ajax.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'Analyst\\Contracts\\RequestorContract' not found in wp-content/plugins/newsletter-email-mailing-list/analyst/src/ApiRequestor.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/newsletter-email-mailing-list/views/un_option_view1.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function getPluginName() on null in wp-content/plugins/newsletter-email-mailing-list/analyst/templates/notice.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/newsletter-email-mailing-list/libs/un_displayIcon.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Analyst\\Http\\Requests\\AbstractLoggerRequest' not found in wp-content/plugins/newsletter-email-mailing-list/analyst/src/Http/Requests/UninstallRequest.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/newsletter-email-mailing-list/libs/un_install_uninstall.php:123
    • > PHP Notice
      Undefined variable: shieldImage in wp-content/plugins/newsletter-email-mailing-list/analyst/templates/optout.php on line 6
    • > PHP Fatal error
      Uncaught Error: Interface 'Analyst\\Contracts\\HttpClientContract' not found in wp-content/plugins/newsletter-email-mailing-list/analyst/src/Http/WordPressHttpClient.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Analyst\\Core\\AbstractFactory' not found in wp-content/plugins/newsletter-email-mailing-list/analyst/src/Account/AccountDataFactory.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
3 plugin tags: notifications, newsletter, subscription form

newsletter-email-mailing-list/newsletter-email-mailing-list.php Passed 13 tests

"Newsletter" version 2.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
68 characters long description:
Easily allow your readers to get new posts by email (automatically).

Code Analysis Passed 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 detected19,665 lines of code in 68 files:
LanguageFilesBlank linesComment linesLines of code
SVG54013,850
PHP537141,3853,479
HTML22420961
CSS4429871
JavaScript47130504

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity2.52
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.28
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces8
Interfaces6
Traits0
Classes23
▷ Abstract classes28.70%
▷ Concrete classes2191.30%
▷ Final classes00.00%
Methods179
▷ Static methods2212.29%
▷ Public methods16089.39%
▷ Protected methods105.59%
▷ Private methods95.03%
Functions67
▷ Named functions5379.10%
▷ Anonymous functions1420.90%
Constants7
▷ Global constants457.14%
▷ Class constants342.86%
▷ Public constants3100.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
47 PNG files occupy 1.17MB with 0.51MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/count_bg.png2.33KB1.22KB▼ 47.74%
images/arrow.png1.82KB1.11KB▼ 39.15%
css/images/left_log_icn.png2.50KB1.86KB▼ 25.51%
images/radio_bg.png3.36KB1.76KB▼ 47.72%
images/bot_arow.png1.50KB0.66KB▼ 56.21%