74% newsletter-html-generator

Code Review | Newsletter HTML Generator

WordPress plugin Newsletter HTML Generator scored74%from 54 tests.

About plugin

  • Plugin page: newsletter-html-g...
  • Plugin version: 1.1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.1.1
  • WordPress version: 6.3.1
  • First release: Feb 19, 2015
  • Latest release: Apr 2, 2015
  • Number of updates: 23
  • Update frequency: every 2.0 days
  • Top authors: Kosteg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,714 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.06MB] [CPU: ▼6.19ms] Passed 4 tests

A check of server-side resources used by Newsletter HTML Generator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0742.17 ▲3.60
Dashboard /wp-admin3.37 ▲0.0652.47 ▲1.14
Posts /wp-admin/edit.php3.42 ▲0.0646.74 ▼11.88
Add New Post /wp-admin/post-new.php5.95 ▲0.0787.30 ▼14.54
Media Library /wp-admin/upload.php3.29 ▲0.0636.14 ▲0.53
Email Templates /wp-admin/edit.php?post_type=email-templates3.3840.90
Add New /wp-admin/post-new.php?post_type=email-templates3.3547.47

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Newsletter HTML Generator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.24 ▼0.111.91 ▲0.1338.57 ▼4.47
Dashboard /wp-admin2,225 ▲455.61 ▼0.0585.00 ▼12.3436.46 ▼6.48
Posts /wp-admin/edit.php2,127 ▲272.02 ▼0.0134.03 ▼4.0735.04 ▲0.13
Add New Post /wp-admin/post-new.php6,239 ▲4,71326.25 ▲3.10881.59 ▲184.0455.78 ▼6.10
Media Library /wp-admin/upload.php1,430 ▲334.22 ▲0.0897.43 ▼3.7643.61 ▼0.85
Email Templates /wp-admin/edit.php?post_type=email-templates1,6212.0133.4334.20
Add New /wp-admin/post-new.php?post_type=email-templates2,0683.9875.7349.65

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/newsletter-html-generator/newsletter-html-generator.php+340
    count(): Parameter must be an array or an object that implements Countable
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/newsletter-html-generator/newsletter-html-generator.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Example of the email template creating.), #2 (Example of generating newsletter HTML from blog post.)
The official readme.txt is a good inspiration

newsletter-html-generator/newsletter-html-generator.php 92% from 13 tests

Analyzing the main PHP file in "Newsletter HTML Generator" version 1.1.7
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 339 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin261 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11079261

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
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%
Functions8
▷ Named functions8100.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
2 PNG files occupy 0.30MB with 0.11MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png205.05KB57.17KB▼ 72.12%
screenshot-2.png99.56KB97.61KB▼ 1.96%