78% custom-comment-notifications

Code Review | Custom Comment Notifications

WordPress plugin Custom Comment Notifications scored78%from 54 tests.

About plugin

  • Plugin page: custom-comment-no...
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2.2
  • WordPress version: 6.3.1
  • First release: Mar 18, 2014
  • Latest release: May 14, 2015
  • Number of updates: 22
  • Update frequency: every 19.2 days
  • Top authors: scweber (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active /4,677 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▼2.78ms] Passed 4 tests

A check of server-side resources used by Custom Comment Notifications
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2244.34 ▼2.82
Dashboard /wp-admin3.52 ▲0.1860.81 ▼5.14
Posts /wp-admin/edit.php3.58 ▲0.2254.53 ▼0.00
Add New Post /wp-admin/post-new.php6.11 ▲0.2299.46 ▼3.14
Media Library /wp-admin/upload.php3.45 ▲0.2245.45 ▲4.32

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 23 new options
New WordPress options
ccn_moderator_comment_subject
ccn_moderator_trackback
ccn_author_pingback_subject
ccn_author_comment_subject
theysaidso_admin_options
widget_theysaidso_widget
ccn_moderator_pingback
ccn_author_pingback
ccn_author_trackback
widget_recent-posts
...

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Comment Notifications
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲1014.39 ▼0.331.75 ▼0.2644.49 ▲1.92
Dashboard /wp-admin2,196 ▲165.61 ▼0.0990.57 ▼4.8541.90 ▼2.59
Posts /wp-admin/edit.php2,110 ▲102.02 ▼0.0642.72 ▲3.9536.46 ▼0.96
Add New Post /wp-admin/post-new.php1,532 ▲623.59 ▼0.11662.93 ▼37.4757.15 ▲2.11
Media Library /wp-admin/upload.php1,407 ▲74.23 ▲0.04111.92 ▼1.1349.18 ▲0.94
Custom Comment Notifications /wp-admin/custom-comment-notifications.php260.420.0714.07

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

Smoke tests 50% 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
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 register_activation_hook() in wp-content/plugins/custom-comment-notifications/custom-comment-notifications.php:342

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/custom-comment-notifications.php
    • > Network (severe)
    wp-admin/custom-comment-notifications.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: e-mail, author, notifications, comment, moderator

custom-comment-notifications/custom-comment-notifications.php 92% from 13 tests

The main PHP script in "Custom Comment Notifications" version 1.0.8 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 150 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected876 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP110161826
JavaScript10030
CSS12620

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.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
PNG images were not found in this plugin