68% newsletter-email-subscribe

Code Review | Newsletter Email Subscribe

WordPress plugin Newsletter Email Subscribe scored68%from 54 tests.

About plugin

  • Plugin page: newsletter-email-...
  • Plugin version: 2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jun 28, 2019
  • Latest release: Dec 10, 2022
  • Number of updates: 19
  • Update frequency: every 66.4 days
  • Top authors: anilankola (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,001 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.61ms] Passed 4 tests

Server-side resources used by Newsletter Email Subscribe
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.58 ▼3.58
Dashboard /wp-admin3.32 ▲0.0145.15 ▼6.90
Posts /wp-admin/edit.php3.37 ▲0.0148.59 ▼3.16
Add New Post /wp-admin/post-new.php5.91 ▲0.0283.52 ▼12.81
Media Library /wp-admin/upload.php3.24 ▲0.0134.64 ▲1.36
Settings /wp-admin/admin.php?page=newsletter-settings3.2031.32
Newsletter /wp-admin/admin.php?page=newsletter3.2031.83

Server storage [IO: ▲0.13MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: 1 new table, 6 new options
New tables
wp_newsletter_email
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Newsletter Email Subscribe: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,949 ▲21413.80 ▼0.587.00 ▲5.2443.10 ▼4.30
Dashboard /wp-admin2,243 ▲555.14 ▼0.74111.67 ▲11.5741.23 ▼1.02
Posts /wp-admin/edit.php2,123 ▲342.48 ▲0.4839.07 ▼1.9134.75 ▲2.37
Add New Post /wp-admin/post-new.php1,543 ▲2323.42 ▲0.27681.01 ▲9.3859.93 ▲4.26
Media Library /wp-admin/upload.php1,422 ▲344.44 ▲0.21101.57 ▲0.8242.16 ▼1.74
Settings /wp-admin/admin.php?page=newsletter-settings8611.9227.9128.13
Newsletter /wp-admin/admin.php?page=newsletter1,0062.4443.2527.59

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_newsletter_email
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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 trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/newsletter-email-subscribe/nels_functions.php:79

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=newsletter
    • > Network (severe)
    wp-content/plugins/newsletter-email-subscribe/images/sort_both.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Requires php: Invalid version format
Please take inspiration from this readme.txt

newsletter-email-subscribe/newsletter-email-subscribe.php 92% from 13 tests

This is the main PHP file of "Newsletter Email Subscribe" version 2.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • 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

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
Everything looks great! No dangerous files found in this plugin532 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP21425290
JavaScript325232
CSS31010

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Functions11
▷ Named functions11100.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