83% comment-moderation-e-mail-to-post-author

Code Review | Comment Moderation E-mail only to Author

WordPress plugin Comment Moderation E-mail only to Author scored83%from 54 tests.

About plugin

  • Plugin page: comment-moderatio...
  • Plugin version: 0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-5.7
  • WordPress version: 6.3.1
  • First release: Dec 30, 2010
  • Latest release: May 11, 2021
  • Number of updates: 50
  • Update frequency: every 76.4 days
  • Top authors: RavanH (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

2,000+ active /20,875 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.76ms] Passed 4 tests

Analyzing server-side resources used by Comment Moderation E-mail only to Author
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0043.56 ▲0.04
Dashboard /wp-admin3.31 ▲0.0051.70 ▼1.87
Posts /wp-admin/edit.php3.36 ▲0.0048.65 ▼2.59
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.05 ▼14.61
Media Library /wp-admin/upload.php3.23 ▲0.0035.36 ▲2.59

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

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

Browser metrics Passed 4 tests

Comment Moderation E-mail only to Author: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.34 ▼0.311.82 ▲0.0542.79 ▲5.23
Dashboard /wp-admin2,198 ▲215.64 ▼0.0992.35 ▼0.1438.72 ▼3.91
Posts /wp-admin/edit.php2,097 ▼31.99 ▲0.0333.59 ▼0.7236.16 ▼7.20
Add New Post /wp-admin/post-new.php1,526 ▼323.22 ▲0.20667.36 ▲22.9354.97 ▲6.25
Media Library /wp-admin/upload.php1,400 ▼34.18 ▼0.0094.43 ▼5.9946.90 ▲2.46

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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 items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/comment-moderation-e-mail-to-post-author/comment-moderation-to-author.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
You can take inspiration from this readme.txt

comment-moderation-e-mail-to-post-author/comment-moderation-to-author.php 85% from 13 tests

The main PHP script in "Comment Moderation E-mail only to Author" version 0.6 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("comment-moderation-e-mail-to-post-author.php" instead of "comment-moderation-to-author.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 656 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected15 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP142415

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.57
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin