68% newsletter-converter

Code Review | Newsletter Converter

WordPress plugin Newsletter Converter scored68%from 54 tests.

About plugin

  • Plugin page: newsletter-converter
  • Plugin version: 1.0.10
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7+
  • WordPress version: 6.3.1
  • First release: Jul 15, 2009
  • Latest release: Oct 20, 2011
  • Number of updates: 24
  • Update frequency: every 38.8 days
  • Top authors: ericjuden (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /6,895 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.96MB] [CPU: ▼45.03ms] Passed 4 tests

This is a short check of server-side resources used by Newsletter Converter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.23 ▼0.45
Dashboard /wp-admin2.99 ▼0.3522.96 ▼43.13
Posts /wp-admin/edit.php2.99 ▼0.3625.03 ▼26.15
Add New Post /wp-admin/post-new.php2.99 ▼2.8922.22 ▼93.23
Media Library /wp-admin/upload.php2.99 ▼0.2323.10 ▼17.59
Newsletter Converter /wp-admin/tools.php?page=newsletter-converter2.9926.45
Newsletter Converter /wp-admin/options-general.php?page=newsletter-converter3.0023.94

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Newsletter Converter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲5114.28 ▼0.341.67 ▼0.0040.79 ▼3.08
Dashboard /wp-admin2,203 ▲265.63 ▲0.0683.94 ▼2.4441.34 ▼2.46
Posts /wp-admin/edit.php2,111 ▲111.97 ▲0.0333.81 ▼1.8233.19 ▼7.16
Add New Post /wp-admin/post-new.php1,532 ▲423.73 ▲0.43671.30 ▲5.4264.42 ▼2.96
Media Library /wp-admin/upload.php1,408 ▲84.23 ▲0.0898.76 ▼5.7243.17 ▼1.02
Newsletter Converter /wp-admin/tools.php?page=newsletter-converter7762.0027.4636.18
Newsletter Converter /wp-admin/options-general.php?page=newsletter-converter8032.0324.7625.16

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
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% 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
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=newsletter-converter
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/tools.php?page=newsletter-converter
    • > Warning in wp-content/plugins/newsletter-converter/newsletter-converter.php+168
    DOMDocument::loadHTML(): Tag header invalid in Entity, line: 55
    • > GET request to /wp-admin/tools.php?page=newsletter-converter
    • > Warning in wp-content/plugins/newsletter-converter/newsletter-converter.php+168
    DOMDocument::loadHTML(): Tag main invalid in Entity, line: 73
    • > GET request to /wp-admin/tools.php?page=newsletter-converter
    • > Warning in wp-content/plugins/newsletter-converter/newsletter-converter.php+168
    DOMDocument::loadHTML(): Tag article invalid in Entity, line: 77
    • > GET request to /wp-admin/tools.php?page=newsletter-converter
    • > Warning in wp-content/plugins/newsletter-converter/newsletter-converter.php+168
    DOMDocument::loadHTML(): Tag header invalid in Entity, line: 80
    • > GET request to /wp-admin/tools.php?page=newsletter-converter
    • > Warning in wp-content/plugins/newsletter-converter/newsletter-converter.php+168
    DOMDocument::loadHTML(): Tag footer invalid in Entity, line: 87
    • > GET request to /wp-admin/tools.php?page=newsletter-converter
    • > Warning in wp-content/plugins/newsletter-converter/newsletter-converter.php+168
    DOMDocument::loadHTML(): Tag time invalid in Entity, line: 88
    • > GET request to /wp-admin/tools.php?page=newsletter-converter
    • > Warning in wp-content/plugins/newsletter-converter/newsletter-converter.php+168
    DOMDocument::loadHTML(): Tag aside invalid in Entity, line: 95
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=newsletter-converter
    • > Warning in wp-content/plugins/newsletter-converter/newsletter-converter.php+168
    DOMDocument::loadHTML(): Tag section invalid in Entity, line: 96
    • > GET request to /wp-admin/tools.php?page=newsletter-converter
    • > Warning in wp-content/plugins/newsletter-converter/newsletter-converter.php+168
    DOMDocument::loadHTML(): Tag section invalid in Entity, line: 97
    • > GET request to /wp-admin/tools.php?page=newsletter-converter
    • > Warning in wp-content/plugins/newsletter-converter/newsletter-converter.php+168
    DOMDocument::loadHTML(): Tag article invalid in Entity, line: 97
    • > GET request to /wp-admin/tools.php?page=newsletter-converter
    • > Warning in wp-content/plugins/newsletter-converter/newsletter-converter.php+168
    DOMDocument::loadHTML(): Tag footer invalid in Entity, line: 97
    • > GET request to /wp-admin/tools.php?page=newsletter-converter
    • > Warning in wp-content/plugins/newsletter-converter/newsletter-converter.php+168
    DOMDocument::loadHTML(): Tag footer invalid in Entity, line: 100
    • > GET request to /wp-admin/tools.php?page=newsletter-converter
    • > Warning in wp-content/plugins/newsletter-converter/newsletter-converter.php+168
    DOMDocument::loadHTML(): End tag : expected '>' in Entity, line: 119
    • > GET request to /wp-admin/tools.php?page=newsletter-converter
    • > Warning in wp-content/plugins/newsletter-converter/newsletter-converter.php+168
    DOMDocument::loadHTML(): Unexpected end tag : scr in Entity, line: 119
  • 41 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=newsletter-converter
    • > Warning in wp-content/plugins/newsletter-converter/newsletter-converter.php+346
    preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
  • 41 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=newsletter-converter
    • > Warning in wp-content/plugins/newsletter-converter/newsletter-converter.php+174
    DOMXPath::query(): Invalid expression

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/newsletter-converter/newsletter-converter.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (The main screen for the plugin. It runs automatically when going to the plugin page.), #2 (The settings page.)
The official readme.txt is a good inspiration

newsletter-converter/newsletter-converter.php Passed 13 tests

"Newsletter Converter" version 1.0.10's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
41 characters long description:
Create HTML for email-friendly newsletter

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
No dangerous file extensions were detected259 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15336259

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Constants4
▷ Global constants4100.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.05MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png38.12KB19.78KB▼ 48.11%
screenshot-2.png15.36KB6.18KB▼ 59.74%