89% yydevelopment-comments-notification

Code Review | Comments Alert Notification

WordPress plugin Comments Alert Notification scored89%from 54 tests.

About plugin

  • Plugin page: yydevelopment-com...
  • Plugin version: 1.5.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 14, 2018
  • Latest release: Aug 21, 2023
  • Number of updates: 46
  • Update frequency: every 41.6 days
  • Top authors: yydevelopment (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,781 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.01MB] [CPU: ▼5.18ms] Passed 4 tests

This is a short check of server-side resources used by Comments Alert Notification
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.69 ▼4.17
Dashboard /wp-admin3.31 ▲0.0144.89 ▼6.28
Posts /wp-admin/edit.php3.37 ▲0.0147.41 ▲1.35
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.39 ▼11.61
Media Library /wp-admin/upload.php3.24 ▲0.0137.76 ▲3.96

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
yydev_comments_notification_timestamp
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Comments Alert Notification
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.27 ▲0.121.47 ▼0.3938.74 ▲0.62
Dashboard /wp-admin2,198 ▲205.64 ▼0.0786.01 ▼28.1843.11 ▼2.14
Posts /wp-admin/edit.php2,103 ▲62.03 ▲0.0539.57 ▲1.6033.68 ▼1.29
Add New Post /wp-admin/post-new.php1,532 ▼323.08 ▲4.68640.95 ▲5.6145.61 ▼30.96
Media Library /wp-admin/upload.php1,400 ▼04.23 ▲0.0294.58 ▼6.1242.53 ▼0.91

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
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • yydev_comments_notification_timestamp
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 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 Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Requires at least: Invalid version format
You can take inspiration from this readme.txt

yydevelopment-comments-notification/index.php 92% from 13 tests

The entry point to "Comments Alert Notification" version 1.5.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("yydevelopment-comments-notification.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected314 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP213877266
PO File28848

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/comments-icon.png0.63KB0.65KB0.00%
images/icon.png3.53KB1.83KB▼ 48.24%