90% add-plain-text-email

Code Review | Add Plain-Text Email

WordPress plugin Add Plain-Text Email scored90%from 54 tests.

About plugin

  • Plugin page: add-plain-text-email
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.4
  • WordPress version: 6.3.1
  • First release: Oct 23, 2013
  • Latest release: Nov 20, 2023
  • Number of updates: 14
  • Update frequency: every 262.9 days
  • Top authors: DvanKooten (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /2,781 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼0.97ms] Passed 4 tests

Server-side resources used by Add Plain-Text Email
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0140.42 ▲0.28
Dashboard /wp-admin3.32 ▲0.0148.20 ▼2.75
Posts /wp-admin/edit.php3.37 ▲0.0145.71 ▼0.28
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.71 ▼0.65
Media Library /wp-admin/upload.php3.24 ▲0.0133.56 ▼0.18

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Add Plain-Text Email
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.34 ▲0.091.65 ▼0.0842.97 ▼1.57
Dashboard /wp-admin2,195 ▲185.61 ▲0.0899.13 ▼3.3243.65 ▲1.76
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0035.89 ▼1.1933.87 ▼2.54
Add New Post /wp-admin/post-new.php1,526 ▼023.53 ▲0.38588.76 ▼60.0854.58 ▼2.25
Media Library /wp-admin/upload.php1,394 ▼94.22 ▲0.0198.58 ▲0.4341.94 ▼3.53

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: html email, spam, text email, spamassassin, email

add-plain-text-email/add-plain-text-email.php Passed 13 tests

"Add Plain-Text Email" version 1.2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
98 characters long description:
Adds a text/plain email to text/html emails to decrease the chance of emails being tagged as spam.

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
Everything looks great! No dangerous files found in this plugin632 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP11155417632

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity19.20
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods44
▷ Static methods1943.18%
▷ Public methods4090.91%
▷ Protected methods00.00%
▷ Private methods49.09%
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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin