72% message-to-author

Code Review | Message to Author

WordPress plugin Message to Author scored 72% from 54 tests.

About plugin

  • Plugin page: message-to-author
  • Plugin version: 4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 12, 2016
  • Latest release: Nov 24, 2022
  • Number of updates: 24
  • Update frequency: every 104.5 days
  • Top authors: pathusutariya (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active / 3,011 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.20MB] [CPU: ▼1.64ms] Passed 4 tests

This is a short check of server-side resources used by Message to Author
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1938.58 ▼0.65
Dashboard /wp-admin3.55 ▲0.2446.21 ▼0.91
Posts /wp-admin/edit.php3.60 ▲0.2448.03 ▼5.16
Add New Post /wp-admin/post-new.php6.09 ▲0.2096.04 ▲0.64
Media Library /wp-admin/upload.php3.41 ▲0.1836.91 ▲0.17
Settings /wp-admin/edit.php?post_type=m2a_messages&page=m2a_settings3.3832.90
All Messages /wp-admin/edit.php?post_type=m2a_messages3.4536.19

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 34 new files
Database: no new tables, 14 new options
New WordPress options
widget_theysaidso_widget
m2a_mail_setting
m2a_captcha_flag
widget_recent-comments
db_upgraded
theysaidso_admin_options
m2a_allow_visitor
m2a_labels
m2a_layout
m2a_after_post
...

Browser metrics Passed 4 tests

An overview of browser requirements for Message to Author
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,936 ▲20113.96 ▼0.425.25 ▲3.4240.24 ▼6.80
Dashboard /wp-admin2,234 ▲465.85 ▲0.04108.88 ▼4.1939.24 ▼2.97
Posts /wp-admin/edit.php2,117 ▲282.02 ▲0.0340.75 ▼1.9533.90 ▼3.41
Add New Post /wp-admin/post-new.php1,539 ▼323.42 ▲5.33670.52 ▲4.7959.67 ▼7.13
Media Library /wp-admin/upload.php1,416 ▲284.28 ▲0.0695.49 ▼5.0340.92 ▼2.94
Settings /wp-admin/edit.php?post_type=m2a_messages&page=m2a_settings1,0302.0324.0429.68
All Messages /wp-admin/edit.php?post_type=m2a_messages1,0752.0033.6230.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 14 options in the database
    • m2a_after_post
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • m2a_layout
    • m2a_captcha_conf
    • m2a_mail_setting
    • can_compress_scripts
    • widget_recent-posts
    • m2a_style
    • ...

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/message-to-author/public/partials/message-box.php
  • 13× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'M2A_Abstruct' not found in wp-content/plugins/message-to-author/admin/M2A_cpt_messages.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'M2A_Abstruct' not found in wp-content/plugins/message-to-author/admin/M2A_Admin.php:3
    • > PHP Warning
      include(): Failed opening 'M2A_DIRtemplates/form.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/message-to-author/public/partials/message-box.php on line 2
    • > PHP Warning
      include(M2A_DIRtemplates/form.php): failed to open stream: No such file or directory in wp-content/plugins/message-to-author/public/partials/message-box.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'M2A_Abstruct' not found in wp-content/plugins/message-to-author/public/M2A_Emails.php:4
    • > PHP Warning
      Use of undefined constant M2A_DIR - assumed 'M2A_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/message-to-author/public/partials/message-box.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'M2A_Abstruct' not found in wp-content/plugins/message-to-author/public/M2A_Public.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'M2A_Abstruct' not found in wp-content/plugins/message-to-author/admin/M2A_Settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bloginfo() in wp-content/plugins/message-to-author/public/partials/email-template.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/message-to-author/public/partials/popup.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=m2a_messages
    • > Network (severe)
    wp-content/plugins/message-to-author/admin/css/M2A-admin.css?ver=4.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=m2a_messages
    • > Network (severe)
    wp-content/plugins/message-to-author/admin/js/M2A-admin.js?ver=4.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI found ("")
The official readme.txt might help

message-to-author/message-to-author.php 92% from 13 tests

The primary PHP file in "Message to Author" version 4.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected1,027 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP21152145831
CSS4822100
Markdown126056
JavaScript20140

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity4.62
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.70
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods67
▷ Static methods22.99%
▷ Public methods4567.16%
▷ Protected methods68.96%
▷ Private methods1623.88%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants3
▷ Global constants3100.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