62% soundst-newsletter-generator

Code Review | Soundst Newsletter generator

WordPress plugin Soundst Newsletter generator scored62%from 54 tests.

About plugin

  • Plugin page: soundst-newslette...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5
  • WordPress version: 6.3.1
  • First release: Jul 18, 2013
  • Latest release: Jan 9, 2014
  • Number of updates: 7
  • Update frequency: every 25.0 days
  • Top authors: SoundStrategies (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /677 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.55MB] [CPU: ▼28.93ms] Passed 4 tests

An overview of server-side resources used by Soundst Newsletter generator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1939.66 ▲0.28
Dashboard /wp-admin3.39 ▲0.0927.05 ▼21.75
Posts /wp-admin/edit.php3.39 ▲0.0329.39 ▼18.80
Add New Post /wp-admin/post-new.php3.39 ▼2.5028.27 ▼65.60
Media Library /wp-admin/upload.php3.39 ▲0.1625.76 ▼9.55
Archive /wp-admin/edit.php?post_type=ng_newsletters3.3929.12
Settings /wp-admin/admin.php?page=NGPluginPage3.57119.15
Create /wp-admin/post-new.php?post_type=ng_newsletters3.4023.42

Server storage [IO: ▲0.09MB] [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, 47 new options
New WordPress options
ng_thumb_align
ng_h3_font_size
ng_mbg
ng_posts_padding
ng_bgc
db_upgraded
ng_h3_link_color
ng_post_size
widget_recent-comments
ng_h1_text_color
...

Browser metrics Passed 4 tests

A check of browser resources used by Soundst Newsletter generator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲9013.21 ▼1.374.53 ▲2.8940.35 ▼2.54
Dashboard /wp-admin2,245 ▲745.86 ▼0.02111.19 ▲11.4739.96 ▼8.97
Posts /wp-admin/edit.php2,125 ▲332.04 ▼0.0040.91 ▼0.9235.22 ▼0.81
Add New Post /wp-admin/post-new.php1,554 ▲4018.32 ▲0.81637.23 ▼55.6855.31 ▼0.60
Media Library /wp-admin/upload.php1,424 ▲364.15 ▼0.0894.03 ▼8.3741.15 ▼1.86
Archive /wp-admin/edit.php?post_type=ng_newsletters1,2593.4356.7527.74
Settings /wp-admin/admin.php?page=NGPluginPage1,6063.2655.7131.74
Create /wp-admin/post-new.php?post_type=ng_newsletters1,7883.6361.9132.53

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/soundst-newsletter-generator/ss-newsletter.php+714
    Undefined index: page
  • Zombie WordPress options detected upon uninstall: 47 options
    • widget_theysaidso_widget
    • ng_h2_font_family
    • ng_date_color
    • ng_rm_size
    • ng_text_color
    • ng_thumb_pad
    • widget_recent-comments
    • ng_h3_font_family
    • ng_h1_text_color
    • ng_title_color
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ng_newsletters
    • > Notice in wp-content/plugins/soundst-newsletter-generator/ss-newsletter.php+714
    Undefined index: page
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ng_newsletters
    • > Notice in wp-content/plugins/soundst-newsletter-generator/ng_type.php+169
    Undefined index: post_type
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ng_newsletters
    • > Warning in wp-content/plugins/soundst-newsletter-generator/ng_type.php+73
    Use of undefined constant ng_header - assumed 'ng_header' (this will throw an Error in a future version of PHP)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ng_newsletters
    • > Warning in wp-content/plugins/soundst-newsletter-generator/ng_type.php+83
    Use of undefined constant ng_l_sidebar - assumed 'ng_l_sidebar' (this will throw an Error in a future version of PHP)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ng_newsletters
    • > Warning in wp-content/plugins/soundst-newsletter-generator/ng_type.php+93
    Use of undefined constant ng_upper_html - assumed 'ng_upper_html' (this will throw an Error in a future version of PHP)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ng_newsletters
    • > Warning in wp-content/plugins/soundst-newsletter-generator/ng_type.php+102
    Use of undefined constant ng_above_posts - assumed 'ng_above_posts' (this will throw an Error in a future version of PHP)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ng_newsletters
    • > Warning in wp-content/plugins/soundst-newsletter-generator/ng_type.php+111
    Use of undefined constant ng_start_date - assumed 'ng_start_date' (this will throw an Error in a future version of PHP)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ng_newsletters
    • > Warning in wp-content/plugins/soundst-newsletter-generator/ng_type.php+112
    Use of undefined constant ng_end_date - assumed 'ng_end_date' (this will throw an Error in a future version of PHP)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ng_newsletters
    • > Warning in wp-content/plugins/soundst-newsletter-generator/ng_type.php+121
    Use of undefined constant ng_below_posts - assumed 'ng_below_posts' (this will throw an Error in a future version of PHP)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ng_newsletters
    • > Warning in wp-content/plugins/soundst-newsletter-generator/ng_type.php+131
    Use of undefined constant ng_lower_html - assumed 'ng_lower_html' (this will throw an Error in a future version of PHP)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ng_newsletters
    • > Warning in wp-content/plugins/soundst-newsletter-generator/ng_type.php+141
    Use of undefined constant ng_r_sidebar - assumed 'ng_r_sidebar' (this will throw an Error in a future version of PHP)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ng_newsletters
    • > Warning in wp-content/plugins/soundst-newsletter-generator/ng_type.php+151
    Use of undefined constant ng_footer - assumed 'ng_footer' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/post-new.php?post_type=ng_newsletters
    • > Warning in wp-content/plugins/soundst-newsletter-generator/ng_type.php+65
    Use of undefined constant ng_final_html - assumed 'ng_final_html' (this will throw an Error in a future version of PHP)

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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Parse error
      syntax error, unexpected 'endif' (T_ENDIF) in wp-content/plugins/soundst-newsletter-generator/final_html.php on line 233
    • > PHP Parse error
      syntax error, unexpected 'endif' (T_ENDIF) in wp-content/plugins/soundst-newsletter-generator/ng_preview.php on line 200
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/soundst-newsletter-generator/ng_type.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/soundst-newsletter-generator/ss-newsletter.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ng_newsletters
    • > Network (severe)
    wp-content/plugins/ss-newsletter-generator/media.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=ng_newsletters
    • > Network (severe)
    wp-content/plugins/ss-newsletter-generator/common.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid url: "None"
Please take inspiration from this readme.txt

soundst-newsletter-generator/ss-newsletter.php 85% from 13 tests

This is the main PHP file of "Soundst Newsletter generator" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 156 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("soundst-newsletter-generator.php" instead of "ss-newsletter.php")

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
Success! There were no dangerous files found in this plugin2,483 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP42982572,331
JavaScript2175105
CSS11047

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.27
Average class complexity122.00
▷ Minimum class complexity122.00
▷ Maximum class complexity122.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity73.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods77
▷ Static methods22.60%
▷ Public methods77100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.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
PNG images were not found in this plugin