90% comment-admin-notifier

Code Review | Comment Admin Notifier

WordPress plugin Comment Admin Notifier scored90%from 54 tests.

About plugin

  • Plugin page: comment-admin-not...
  • Plugin version: 1.1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.0
  • WordPress version: 6.3.1
  • First release: Dec 30, 2017
  • Latest release: Jul 9, 2022
  • Number of updates: 7
  • Update frequency: every 236.0 days
  • Top authors: softmodeling (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,016 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.46ms] Passed 4 tests

Analyzing server-side resources used by Comment Admin Notifier
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.98 ▲1.15
Dashboard /wp-admin3.36 ▲0.0248.59 ▼12.19
Posts /wp-admin/edit.php3.47 ▲0.1245.46 ▼1.97
Add New Post /wp-admin/post-new.php5.94 ▲0.0587.40 ▼4.83
Media Library /wp-admin/upload.php3.28 ▲0.0634.92 ▲3.12

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Comment Admin Notifier
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.18 ▼0.381.73 ▲0.2144.37 ▲3.46
Dashboard /wp-admin2,192 ▲155.54 ▼0.0584.53 ▼2.6439.71 ▲1.29
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0436.29 ▲1.5531.69 ▼7.88
Add New Post /wp-admin/post-new.php1,526 ▼223.09 ▼0.38640.49 ▼42.8453.02 ▼8.21
Media Library /wp-admin/upload.php1,403 ▲64.19 ▲0.0296.03 ▼4.6645.42 ▼1.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • 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)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: admin, discussion, alert, email, notification...

comment-admin-notifier/comment-admin-notifier.php Passed 13 tests

The principal PHP file in "Comment Admin Notifier" v. 1.1.3 is loaded by WordPress automatically on each request
114 characters long description:
Enables admin users to be notified about all new published comments (even if they're not the authors of the posts)

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
Good job! No executable or dangerous file extensions detected242 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP11133393242

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.38
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.41
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2177.78%
▷ Protected methods00.00%
▷ Private methods622.22%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin