84% plaintext-newsletter

Code Review | Plaintext for the Newsletter plugin

WordPress plugin Plaintext for the Newsletter plugin scored84%from 54 tests.

About plugin

  • Plugin page: plaintext-newsletter
  • Plugin version: 3.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Jul 12, 2019
  • Latest release: Aug 15, 2023
  • Number of updates: 25
  • Update frequency: every 59.9 days
  • Top authors: franciscus (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,213 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.01MB] [CPU: ▼6.09ms] Passed 4 tests

This is a short check of server-side resources used by Plaintext for the Newsletter plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.90 ▼13.65
Dashboard /wp-admin3.31 ▲0.0147.69 ▼4.20
Posts /wp-admin/edit.php3.36 ▲0.0148.43 ▼0.22
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.07 ▼6.23
Media Library /wp-admin/upload.php3.23 ▲0.0035.06 ▼0.27

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Plaintext for the Newsletter plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.27 ▲0.091.89 ▲0.1241.31 ▼14.93
Dashboard /wp-admin2,195 ▲215.62 ▲0.1195.91 ▼7.5442.07 ▼1.10
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0338.11 ▼1.4034.25 ▼1.04
Add New Post /wp-admin/post-new.php1,526 ▼223.23 ▲0.23642.84 ▲33.1957.58 ▼0.27
Media Library /wp-admin/upload.php1,403 ▲64.20 ▼0.06101.87 ▼2.8740.19 ▼6.21

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/plaintext-newsletter/plaintext-newsletter.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'NewsletterAddon' not found in wp-content/plugins/plaintext-newsletter/plugin.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PlaintextMailerBase' not found in wp-content/plugins/plaintext-newsletter/mailer.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: plain text, newsletter, add-on

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

The principal PHP file in "Plaintext for the Newsletter plugin" v. 3.1 is loaded by WordPress automatically on each request
46 characters long description:
Plain text generator for The Newsletter Plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin241 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP45260214
PO File13626
JavaScript1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity15.00
▷ Minimum class complexity4.00
▷ Maximum class complexity26.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.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
PNG images were not found in this plugin