74% newsletter-signup

Code Review | Newsletter-Signup

WordPress plugin Newsletter-Signup scored74%from 54 tests.

About plugin

  • Plugin page: newsletter-signup
  • Plugin version: 0.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.9.1
  • WordPress version: 6.3.1
  • First release: May 21, 2014
  • Latest release: Jun 17, 2014
  • Number of updates: 17
  • Update frequency: every 1.6 days
  • Top authors: maartenhemmes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /4,697 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 gracefully, with no errors

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

Analyzing server-side resources used by Newsletter-Signup
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0140.86 ▲0.63
Dashboard /wp-admin3.32 ▲0.0147.25 ▼1.52
Posts /wp-admin/edit.php3.37 ▲0.0151.24 ▼4.04
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.90 ▼7.50
Media Library /wp-admin/upload.php3.24 ▲0.0142.43 ▲6.45

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: 1 new table, 7 new options
New tables
wp_newsletter
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
jal_db_version

Browser metrics Passed 4 tests

Checking browser requirements for Newsletter-Signup
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲6914.25 ▼0.042.09 ▲0.5944.34 ▲4.11
Dashboard /wp-admin2,211 ▲315.62 ▼0.0590.10 ▼3.4840.29 ▼1.69
Posts /wp-admin/edit.php2,116 ▲131.98 ▼0.0338.90 ▼3.9336.64 ▲0.01
Add New Post /wp-admin/post-new.php1,539 ▲1123.65 ▲0.61674.39 ▲19.5251.50 ▲1.19
Media Library /wp-admin/upload.php1,416 ▲194.21 ▲0.0295.05 ▼10.0844.72 ▲0.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_newsletter
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • jal_db_version
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× 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-signup/functions.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/newsletter-signup/functions.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: newsletter, signup, form

newsletter-signup/newsletter-signup.php Passed 13 tests

The entry point to "Newsletter-Signup" version 0.2.1 is a PHP file that has certain tags in its header comment area
62 characters long description:
Simple plugin to add a newsletter sign-up form to your website

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin78 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2201178

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions5
▷ Named functions5100.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