83% custom-newsletter-template

Code Review | Custom Newsletter Template

WordPress plugin Custom Newsletter Template scored83%from 54 tests.

About plugin

  • Plugin page: custom-newsletter...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.2-4.7
  • WordPress version: 6.3.1
  • First release: May 29, 2013
  • Latest release: Dec 15, 2016
  • Number of updates: 14
  • Update frequency: every 103.6 days
  • Top authors: cybernetikz (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

30+ active /8,627 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.56ms] Passed 4 tests

Server-side resources used by Custom Newsletter Template
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0540.48 ▼3.55
Dashboard /wp-admin3.36 ▲0.0645.67 ▼4.43
Posts /wp-admin/edit.php3.41 ▲0.0642.61 ▲0.01
Add New Post /wp-admin/post-new.php5.94 ▲0.0678.77 ▼18.26
Media Library /wp-admin/upload.php3.28 ▲0.0635.08 ▲2.74

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 22 new files
Database: no new tables, 28 new options
New WordPress options
cnt-ads2-img
cnt-sidebar-post-count
widget_recent-posts
cnt-font-color
can_compress_scripts
cnt-ads2-link
cnt-favicon
cnt-template-page-id
widget_theysaidso_widget
db_upgraded
...

Browser metrics Passed 4 tests

A check of browser resources used by Custom Newsletter Template
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲4614.74 ▲0.441.90 ▼0.2743.95 ▼0.83
Dashboard /wp-admin2,208 ▲205.93 ▲1.01116.17 ▲14.6177.24 ▲35.56
Posts /wp-admin/edit.php2,103 ▲142.02 ▼0.0234.56 ▼6.6432.13 ▼3.05
Add New Post /wp-admin/post-new.php1,534 ▲1523.13 ▲0.07798.95 ▲216.6259.45 ▲8.49
Media Library /wp-admin/upload.php1,405 ▲174.22 ▼0.0198.58 ▲5.4875.45 ▲35.47

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 27 options
    • cnt-link-color
    • cnt-background-repeat
    • cnt-footer-content
    • cnt-background-color
    • theysaidso_admin_options
    • cnt-favicon
    • widget_recent-comments
    • cnt-font-color
    • cnt-todays-featured-title
    • cnt-social-link
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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

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 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Layout for custom newsletter template in admin panel), #2 (Look and feel for sample domain 1), #3 (Look and feel for sample domain 2), #4 (Look and feel for sample domain 3)
  • Donate link: Please fix this invalid url: ""
You can take inspiration from this readme.txt

custom-newsletter-template/custom-newsletter-template.php Passed 13 tests

This is the main PHP file of "Custom Newsletter Template" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
40 characters long description:
Custom Template Generator for Newsletter

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
Good job! No executable or dangerous file extensions detected890 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP29838500
CSS24344390

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 PNG files occupy 0.84MB with 0.39MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png258.25KB83.08KB▼ 67.83%
screenshot-1.png119.90KB43.79KB▼ 63.48%
images/nl.png0.87KB0.89KB0.00%
images/bg.png13.01KB8.71KB▼ 33.01%
screenshot-4.png228.14KB67.28KB▼ 70.51%