58% newsletter-subscription-widget-for-sendblaster

Code Review | Newsletter subscription optin module

WordPress plugin Newsletter subscription optin module scored 58% from 54 tests.

About plugin

  • Plugin page: newsletter-subscr...
  • Plugin version: 1.2.9
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-5.8.1
  • WordPress version: 5.8.1
  • First release: Nov 3, 2016
  • Latest release: Sep 13, 2021
  • Number of updates: 18
  • Update frequency: every 98.3 days
  • Top authors: nonletter (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 2,075 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.80MB] [CPU: ▼169.03ms] Passed 4 tests

This is a short check of server-side resources used by Newsletter subscription optin module
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.96 ▲0.2335.36 ▲13.94
Dashboard /wp-admin2.86 ▼0.2022.17 ▼21.06
Posts /wp-admin/edit.php2.86 ▼0.2623.91 ▼14.81
Add New Post /wp-admin/post-new.php2.86 ▼2.5820.51 ▼624.93
Media Library /wp-admin/upload.php2.86 ▼0.1518.04 ▼15.33
WP SendBlaster Opt-in /wp-admin/options-general.php?page=newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php2.8623.41

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: 1 new table, 20 new options
New tables
wp_wpsb_users
New WordPress options
wpsb_form_header
wpsb_link_love
wpsb_auto_delete
wpsb_msg_bad
wpsb_dbl_fail
wpsb_privacy_label
wpsb_email_from
wpsb_form_fields
wpsb_msg_fail
wpsb_form_footer
...

Browser metrics Passed 4 tests

A check of browser resources used by Newsletter subscription optin module
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11215.77 ▲0.5210.61 ▲0.2147.29 ▼5.90
Dashboard /wp-admin2,972 ▲385.92 ▼0.20144.88 ▲8.43105.83 ▼12.47
Posts /wp-admin/edit.php2,744 ▲52.72 ▲0.0160.28 ▼8.0988.40 ▼7.62
Add New Post /wp-admin/post-new.php3,639 ▲2,14115.26 ▼3.59414.64 ▲44.90112.30 ▼1.00
Media Library /wp-admin/upload.php1,809 ▲25.05 ▲0.05147.54 ▲0.83118.87 ▲1.53
WP SendBlaster Opt-in /wp-admin/options-general.php?page=newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php2,0222.2260.0190.53

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_wpsb_users
  • This plugin does not fully uninstall, leaving 20 options in the database
    • wpsb_form_email
    • wpsb_auto_delete
    • wpsb_form_header
    • wpsb_msg_sent
    • wpsb_dbl_sent
    • wpsb_db_version
    • wpsb_form_footer
    • wpsb_dbl_fail
    • wpsb_email_message
    • wpsb_double_optin
    • ...

Smoke tests 50% 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
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php
    • > Notice in wp-content/plugins/newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php+398
    Undefined index: wpsb_hidden
    • > GET request to /wp-admin/options-general.php?page=newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php
    • > Notice in wp-content/plugins/newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php+586
    Undefined offset: 2
    • > GET request to /wp-admin/options-general.php?page=newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php
    • > Notice in wp-content/plugins/newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php+592
    Undefined offset: 3
    • > GET request to /wp-admin/options-general.php?page=newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php
    • > Notice in wp-content/plugins/newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php+598
    Undefined offset: 4
    • > GET request to /wp-admin/options-general.php?page=newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php
    • > Notice in wp-content/plugins/newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php+604
    Undefined offset: 5
    • > GET request to /wp-admin/options-general.php?page=newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php
    • > Notice in wp-content/plugins/newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php+610
    Undefined offset: 6
    • > GET request to /wp-admin/options-general.php?page=newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php
    • > Notice in wp-content/plugins/newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php+616
    Undefined offset: 7
    • > GET request to /wp-admin/options-general.php?page=newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php
    • > Notice in wp-content/plugins/newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php+622
    Undefined offset: 8
    • > GET request to /wp-admin/options-general.php?page=newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php
    • > Notice in wp-content/plugins/newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php+628
    Undefined offset: 9
    • > GET request to /wp-admin/options-general.php?page=newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php
    • > Notice in wp-content/plugins/newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php+634
    Undefined offset: 10
    • > GET request to /wp-admin/options-general.php?page=newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php
    • > Notice in wp-content/plugins/newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php+640
    Undefined offset: 11
    • > GET request to /wp-admin/options-general.php?page=newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php
    • > Notice in wp-content/plugins/newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php+646
    Undefined offset: 12
    • > GET request to /wp-admin/options-general.php?page=newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php
    • > Notice in wp-content/plugins/newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php+652
    Undefined offset: 13
    • > GET request to /wp-admin/options-general.php?page=newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php
    • > Notice in wp-content/plugins/newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php+658
    Undefined offset: 14
    • > GET request to /wp-admin/options-general.php?page=newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php
    • > Notice in wp-content/plugins/newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php+664
    Undefined offset: 15

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php:887

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 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
6 plugin tags: management, sidebar, widget, email, bulk email...

newsletter-subscription-widget-for-sendblaster/wpsb-opt-in.php 77% from 13 tests

"Newsletter subscription optin module" version 1.2.9's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Requires at least: The required version number did not match the one declared in readme.txt ("2.9.0" instead of "2.9")
  • Description: Keep the plugin description shorter than 140 characters (currently 250 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("newsletter-subscription-widget-for-sendblaster.php" instead of "wpsb-opt-in.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin777 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15955777

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin