84% getanewsletter

Code Review | Get a Newsletter

WordPress plugin Get a Newsletter scored84%from 54 tests.

About plugin

  • Plugin page: getanewsletter
  • Plugin version: 3.0.4
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.0-5.8.2
  • WordPress version: 6.3.1
  • First release: Feb 15, 2016
  • Latest release: Nov 25, 2021
  • Number of updates: 26
  • Update frequency: every 81.2 days
  • Top authors: getanewsletter (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /6,353 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.23MB] [CPU: ▼4.15ms] Passed 4 tests

This is a short check of server-side resources used by Get a Newsletter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2339.28 ▼1.10
Dashboard /wp-admin3.53 ▲0.2347.89 ▲4.66
Posts /wp-admin/edit.php3.64 ▲0.2948.53 ▼3.27
Add New Post /wp-admin/post-new.php6.11 ▲0.2387.78 ▼14.32
Media Library /wp-admin/upload.php3.45 ▲0.2335.99 ▲2.10
Settings /wp-admin/admin.php?page=newsletter3.4232.68
Subscription forms /wp-admin/admin.php?page=newsletter_subscription_forms3.4234.16

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 10 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
newsletter_plugin_version
widget_theysaidso_widget
widget_recent-posts
newsletter_default_verify_mail_subject
newsletter_default_verify_mail_text
widget_getanewsletter

Browser metrics Passed 4 tests

A check of browser resources used by Get a Newsletter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,911 ▲14013.64 ▼0.645.26 ▲3.2944.76 ▼4.46
Dashboard /wp-admin2,238 ▲594.87 ▼0.98103.30 ▼2.4741.05 ▲0.32
Posts /wp-admin/edit.php2,119 ▲332.02 ▼0.0240.09 ▲0.4535.59 ▼1.11
Add New Post /wp-admin/post-new.php1,436 ▼9718.12 ▼5.14609.78 ▼52.5255.12 ▲3.53
Media Library /wp-admin/upload.php1,412 ▲244.23 ▲0.0499.05 ▼6.0642.41 ▼2.35
Settings /wp-admin/admin.php?page=newsletter8241.8425.9727.37
Subscription forms /wp-admin/admin.php?page=newsletter_subscription_forms8241.7324.5825.84

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • newsletter_default_verify_mail_subject
    • newsletter_plugin_version
    • widget_recent-posts
    • newsletter_default_verify_mail_text
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_getanewsletter

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 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/getanewsletter/getanewsletter.php:20
    • > PHP Notice
      Undefined index: HTTP_REFERER in wp-content/plugins/getanewsletter/subscribe.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
4 plugin tags: email, subscription, newsletter, marketing

getanewsletter/getanewsletter.php Passed 13 tests

The main PHP file in "Get a Newsletter" ver. 3.0.4 adds more information about the plugin and also serves as the entry point for this plugin
58 characters long description:
Plugin to add subscription form to the site using widgets.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin1,500 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP32434451,500

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity31.67
▷ Minimum class complexity1.00
▷ Maximum class complexity58.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods40
▷ Static methods25.00%
▷ Public methods3587.50%
▷ Protected methods37.50%
▷ Private methods25.00%
Functions34
▷ Named functions3088.24%
▷ Anonymous functions411.76%
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
No PNG files were detected