10% email-notification-on-comment-approval

Code Review | Email Notification On Comment Approval

WordPress plugin Email Notification On Comment Approval scored10%from 54 tests.

About plugin

  • Plugin page: email-notificatio...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-3.5.1
  • WordPress version: 6.3.1
  • First release: Feb 5, 2013
  • Latest release: Feb 5, 2013
  • Number of updates: 7
  • Update frequency: N/A
  • Top authors: pranjan (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /1,897 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure had errors
    • > User deprecated in wp-includes/functions.php+5453
    Function get_settings is deprecated since version 2.1.0! Use get_option() instead.

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.43ms] Passed 4 tests

Analyzing server-side resources used by Email Notification On Comment Approval
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.35 ▼0.10
Dashboard /wp-admin3.33 ▲0.0344.81 ▼5.34
Posts /wp-admin/edit.php3.38 ▲0.0346.14 ▲0.42
Add New Post /wp-admin/post-new.php5.91 ▲0.0381.38 ▼20.70
Media Library /wp-admin/upload.php3.26 ▲0.0336.79 ▲4.92

Server storage [IO: ▲0.01MB] [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: 2 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-comments
enocp_subject
enocp_email_content
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
enocp_cc
enocp_from
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Email Notification On Comment Approval
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.28 ▼0.101.68 ▼0.0641.25 ▼0.21
Dashboard /wp-admin2,211 ▲335.56 ▼0.1586.99 ▼14.3340.04 ▼0.47
Posts /wp-admin/edit.php2,113 ▲132.00 ▲0.0136.84 ▲0.1934.81 ▼10.63
Add New Post /wp-admin/post-new.php1,539 ▲923.02 ▲0.01665.59 ▼33.0356.91 ▲0.87
Media Library /wp-admin/upload.php1,416 ▲194.21 ▲0.04107.09 ▲3.7448.36 ▲3.30

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • enocp_email_content
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • enocp_from
    • enocp_subject
    • db_upgraded
    • enocp_cc

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/email-notification-on-comment-approval/email-notification-on-comment-approval.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: comments, approval, email, notification

email-notification-on-comment-approval/email-notification-on-comment-approval.php Passed 13 tests

The main PHP file in "Email Notification On Comment Approval" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
78 characters long description:
This Plugin Notifies a comment author by email on approval of his/her comment.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin141 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13223141

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin