93% wp-comment-mail-notify

Code Review | wp_comment_mail_notify

WordPress plugin wp_comment_mail_notify scored 93% from 54 tests.

About plugin

  • Plugin page: wp-comment-mail-n...
  • Plugin version: 0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-4.3.1
  • WordPress version: 5.8.1
  • First release: Dec 1, 2015
  • Latest release: Dec 1, 2015
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: a454213722 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 479 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼144.49ms] Passed 4 tests

An overview of server-side resources used by wp_comment_mail_notify
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0230.45 ▼9.01
Dashboard /wp-admin3.09 ▲0.0355.54 ▲10.22
Posts /wp-admin/edit.php3.14 ▲0.0347.62 ▲1.81
Add New Post /wp-admin/post-new.php5.45 ▲0.0191.60 ▼575.26
Media Library /wp-admin/upload.php3.03 ▲0.0335.90 ▲4.52

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for wp_comment_mail_notify
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,702 ▲10615.83 ▲0.209.01 ▲1.0549.54 ▲1.48
Dashboard /wp-admin2,967 ▲305.88 ▼0.04140.91 ▼11.52118.72 ▼4.64
Posts /wp-admin/edit.php2,739 ▲32.70 ▲0.0163.72 ▼3.87103.67 ▲4.03
Add New Post /wp-admin/post-new.php1,683 ▼018.75 ▲0.08389.23 ▼8.07112.03 ▼2.76
Media Library /wp-admin/upload.php1,807 ▼05.01 ▼0.01152.02 ▼13.58130.21 ▲1.70

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-comment-mail-notify/comment_mail_notify.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Contributors: Plugin contributors not specified
  • Contributors: No valid plugin tags found
The official readme.txt is a good inspiration

wp-comment-mail-notify/comment_mail_notify.php 85% from 13 tests

The principal PHP file in "wp_comment_mail_notify" v. 0.0.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 203 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-comment-mail-notify.php" instead of "comment_mail_notify.php")

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
There were no executable files found in this plugin92 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1161592

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png21.30KB8.15KB▼ 61.73%