10% simple-newsletter-signup

Code Review | Simple Newsletter Signup

WordPress plugin Simple Newsletter Signup scored10%from 54 tests.

About plugin

  • Plugin page: simple-newsletter...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-3.5
  • WordPress version: 6.3.1
  • First release: Oct 30, 2012
  • Latest release: Jun 18, 2013
  • Number of updates: 19
  • Update frequency: every 12.2 days
  • Top authors: yourlocalwebmaster (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

60+ active /12,959 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Error in wp-content/plugins/simple-newsletter-signup/simple-newsletter-signup.php+60
    Uncaught Error: Call to undefined function mysql_query() in wp-content/plugins/simple-newsletter-signup/simple-newsletter-signup.php:60
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): snsf_install()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/includes/plugin.php(693): do_action()

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.23ms] Passed 4 tests

A check of server-side resources used by Simple Newsletter Signup
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0049.16 ▲12.06
Dashboard /wp-admin3.31 ▲0.0047.87 ▼3.60
Posts /wp-admin/edit.php3.36 ▲0.0049.74 ▼0.47
Add New Post /wp-admin/post-new.php5.89 ▲0.0099.52 ▼2.50
Media Library /wp-admin/upload.php3.23 ▲0.0036.34 ▼2.34

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Simple Newsletter Signup: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.68 ▼0.751.78 ▼0.4643.63 ▲2.49
Dashboard /wp-admin2,221 ▲185.86 ▲1.00110.55 ▼1.7041.22 ▼0.43
Posts /wp-admin/edit.php2,103 ▼02.02 ▲0.0339.46 ▼1.0935.40 ▼1.31
Add New Post /wp-admin/post-new.php1,526 ▼1417.51 ▼5.61640.31 ▼19.0556.50 ▲9.36
Media Library /wp-admin/upload.php1,403 ▲64.20 ▲0.01102.45 ▼0.6245.00 ▼1.04

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, 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 fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/simple-newsletter-signup/simple-newsletter-signup-pager.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-newsletter-signup/simple-newsletter-signup.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Plugin Name: You should set the name of your plugin on the first line ( === simple-newsletter-signup === )
The official readme.txt is a good inspiration

simple-newsletter-signup/simple-newsletter-signup.php 92% from 13 tests

The primary PHP file in "Simple Newsletter Signup" version 1.5 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 322 characters long)

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
There were no executable files found in this plugin507 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP29769395
CSS518389
JavaScript215523

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity4.25
▷ Minimum method complexity2.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin