10% simple-newsletter-br

Code Review | Simple Newsletter

WordPress plugin Simple Newsletter scored10%from 54 tests.

About plugin

  • Plugin page: simple-newsletter-br
  • Plugin version: 0.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Apr 14, 2015
  • Latest release: Feb 15, 2016
  • Number of updates: 51
  • Update frequency: every 6.0 days
  • Top authors: ooprogramador (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /6,867 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/simple-newsletter-br/class_newsletter.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; controllerNewsletter has a deprecated constructor

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.55ms] Passed 4 tests

Analyzing server-side resources used by Simple Newsletter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0233.88 ▼6.46
Dashboard /wp-admin3.33 ▲0.0241.93 ▼3.39
Posts /wp-admin/edit.php3.44 ▲0.0840.52 ▼7.11
Add New Post /wp-admin/post-new.php5.91 ▲0.0279.05 ▼5.25
Media Library /wp-admin/upload.php3.25 ▲0.0230.66 ▼1.46
Simple Newsletter /wp-admin/options-general.php?page=simplenewsletter-admin3.2829.80

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: 1 new table, 7 new options
New tables
simplenewsletter_subscriptions
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
widget_widgetsimplenewsletter
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Simple Newsletter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,901 ▲15513.74 ▼0.554.63 ▲2.8437.67 ▼8.04
Dashboard /wp-admin2,226 ▲474.86 ▼1.00114.66 ▲11.8442.82 ▲0.02
Posts /wp-admin/edit.php2,109 ▲202.04 ▲0.0133.42 ▼2.0732.81 ▼1.38
Add New Post /wp-admin/post-new.php1,530 ▲117.76 ▼0.61643.01 ▼29.3067.17 ▲8.30
Media Library /wp-admin/upload.php1,405 ▲174.26 ▲0.1195.64 ▲2.0839.77 ▼5.37
Simple Newsletter /wp-admin/options-general.php?page=simplenewsletter-admin1,0932.0630.6432.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie tables were found after uninstall: 1 table
    • simplenewsletter_subscriptions
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_widgetsimplenewsletter
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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 fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/simple-newsletter-br/simple-newsletter.php:202
    • > PHP Fatal error
      Uncaught Error: Class 'controllerNewsletter' not found in wp-content/plugins/simple-newsletter-br/views/admin_grid.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/simple-newsletter-br/views/admin_form.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/simple-newsletter-br/views/user_form.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: newsletter, email, email template, shortcode, sidebar...

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

The main PHP file in "Simple Newsletter" ver. 0.5.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-newsletter-br.php" instead of "simple-newsletter.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
Success! There were no dangerous files found in this plugin872 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP511922570
PO File15557128
HTML10077
JavaScript211067
Markdown16019
SQL10011

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity14.67
▷ Minimum class complexity7.00
▷ Maximum class complexity20.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/newsletter.png14.92KB6.48KB▼ 56.58%