72% wp-universal-newsletter

Code Review | WP Universal Newsletter

WordPress plugin WP Universal Newsletter scored72%from 54 tests.

About plugin

  • Plugin page: wp-universal-news...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Apr 15, 2016
  • Latest release: Feb 22, 2018
  • Number of updates: 10
  • Update frequency: every 68.2 days
  • Top authors: brettex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,121 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▲3.76ms] Passed 4 tests

Server-side resources used by WP Universal Newsletter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1443.05 ▼0.46
Dashboard /wp-admin3.43 ▲0.1251.00 ▲2.66
Posts /wp-admin/edit.php3.54 ▲0.1855.59 ▲5.72
Add New Post /wp-admin/post-new.php6.03 ▲0.14105.95 ▲13.19
Media Library /wp-admin/upload.php3.35 ▲0.1242.83 ▲7.12
All Newsletters /wp-admin/edit.php?post_type=wpun_newsletter3.3943.49
WP Universal Newsletter /wp-admin/options-general.php?page=newsletter3.4154.92
Add Newsletter /wp-admin/post-new.php?post_type=wpun_newsletter3.4852.86

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

WP Universal Newsletter: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,952 ▲16613.51 ▼1.028.94 ▲6.8739.59 ▼4.84
Dashboard /wp-admin2,247 ▲705.81 ▲0.1496.91 ▼5.1643.01 ▼0.21
Posts /wp-admin/edit.php2,136 ▲362.30 ▲0.2841.74 ▲3.9436.01 ▼0.53
Add New Post /wp-admin/post-new.php1,574 ▲4623.19 ▲0.05667.25 ▼58.1134.88 ▼27.78
Media Library /wp-admin/upload.php1,450 ▲504.35 ▲0.2495.41 ▼31.9244.45 ▼3.40
All Newsletters /wp-admin/edit.php?post_type=wpun_newsletter1,1062.2335.9432.09
WP Universal Newsletter /wp-admin/options-general.php?page=newsletter2,3814.7994.5854.11
Add Newsletter /wp-admin/post-new.php?post_type=wpun_newsletter2,4028.03172.6871.69

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-universal-newsletter/public/partials/plugin-wp-newsletter-display.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to a member function flush_rules() on null in wp-content/plugins/wp-universal-newsletter/admin/partials/wp-newsletter-admin-display.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/wp-universal-newsletter/templates/wpun_single.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function have_posts() in wp-content/plugins/wp-universal-newsletter/templates/wpun_archive-loop.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-universal-newsletter/templates/wpun_archive.php:1

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=newsletter
    • > Network (severe)
    wp-content/themes/twentytwentyone/images/logo.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: mailchimp, newsletter, seo, outlook, html email...

wp-universal-newsletter/wp-universal-newsletter.php 92% from 13 tests

Analyzing the main PHP file in "WP Universal Newsletter" version 1.1.1
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 159 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin1,125 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP152747551,063
JavaScript386235
CSS22927

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity2.50
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.44
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected