68% notification

Code Review | Notification - Custom Notifications and Alerts for WordPress

WordPress plugin Notification - Custom Notifications and Alerts for WordPress scored 68% from 54 tests.

About plugin

  • Plugin page: notification
  • Plugin version: 8.0.15
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2
  • WordPress version: 6.3.1
  • First release: Dec 20, 2011
  • Latest release: Apr 5, 2023
  • Number of updates: 118
  • Update frequency: every 35.0 days
  • Top authors: Kubitomakita (75.42%)bracketspace (25.42%)

Code review

54 tests

User reviews

118 reviews

Install metrics

10,000+ active / 290,032 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲3.82MB] [CPU: ▲23.86ms] Passed 4 tests

Server-side resources used by Notification - Custom Notifications and Alerts for WordPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /7.28 ▲3.8260.75 ▲19.40
Dashboard /wp-admin7.15 ▲3.8576.77 ▲27.36
Posts /wp-admin/edit.php7.20 ▲3.8570.99 ▲25.46
Add New Post /wp-admin/post-new.php9.69 ▲3.81118.50 ▲23.21
Media Library /wp-admin/upload.php7.03 ▲3.8069.02 ▲35.79
Settings /wp-admin/edit.php?post_type=notification&page=settings6.9554.89
Wizard /wp-admin/admin.php?page=wizard7.0369.24
Notifications /wp-admin/edit.php?post_type=notification6.9557.93
Extensions /wp-admin/edit.php?post_type=notification&page=extensions6.9556.07
Add New Notification /wp-admin/post-new.php?post_type=notification6.9555.73

Server storage [IO: ▲3.69MB] [DB: ▲0.02MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 1,244 new files
Database: 1 new table, 8 new options
New tables
wp_notification_logs
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
notification_db_version
notification_data_version
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Notification - Custom Notifications and Alerts for WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲12413.21 ▼1.161.82 ▲0.1739.29 ▼13.52
Dashboard /wp-admin2,262 ▲705.87 ▲0.91111.47 ▼1.2741.69 ▲2.27
Posts /wp-admin/edit.php2,145 ▲562.06 ▲0.0640.30 ▲3.2136.68 ▲5.77
Add New Post /wp-admin/post-new.php1,574 ▲5318.24 ▼4.84621.98 ▼43.2861.47 ▲1.48
Media Library /wp-admin/upload.php1,445 ▲574.22 ▲0.0394.94 ▼4.6541.55 ▼5.64
Settings /wp-admin/edit.php?post_type=notification&page=settings1,8335.3384.3641.01
Wizard /wp-admin/admin.php?page=wizard1,5495.3281.8537.89
Notifications /wp-admin/edit.php?post_type=notification1,8325.3660.4135.69
Extensions /wp-admin/edit.php?post_type=notification&page=extensions1,8305.3166.5838.28
Add New Notification /wp-admin/post-new.php?post_type=notification1,8295.3161.1641.36

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/notification/uninstall.php+17
    Trying to access array offset on value of type bool
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 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
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/notification/vendor/enshrined/svg-sanitize/src/svg-scanner.php
    • > /wp-content/plugins/notification/src/Dependencies/enshrined/svgSanitize/svg-scanner.php
  • 597× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: get in wp-content/plugins/notification/resources/templates/form/field.php on line 14
    • > PHP Warning
      array_values() expects parameter 1 to be array, null given in wp-content/plugins/notification/vendor/enshrined/svg-sanitize/src/svg-scanner.php on line 70
    • > PHP Fatal error
      Trait 'BracketSpace\otification\\Dependencies\\Micropackage\\DocHooks\\HookTrait' not found in wp-content/plugins/notification/src/Runtime.php on line 18
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_HTMLModule' not found in wp-content/plugins/notification/src/Dependencies/HTMLPurifier/HTMLModule/SafeObject.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_URIFilter' not found in wp-content/plugins/notification/src/Dependencies/HTMLPurifier/URIFilter/DisableExternal.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_URIScheme' not found in wp-content/plugins/notification/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/file.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_AttrDef' not found in wp-content/plugins/notification/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/HTML/ID.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'BracketSpace\otification\\Abstracts\\Recipient' not found in wp-content/plugins/notification/src/Defaults/Recipient/UserID.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_AttrDef' not found in wp-content/plugins/notification/src/Dependencies/HTMLPurifier/AttrDef/URI.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_AttrTransform' not found in wp-content/plugins/notification/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrTransform/TargetNoreferrer.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: api, notify, webhook, notification, email...

notification/notification.php 92% from 13 tests

The entry point to "Notification - Custom Notifications and Alerts for WordPress" version 8.0.15 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin41,722 lines of code in 724 files:
LanguageFilesBlank linesComment linesLines of code
PHP6319,24824,34536,594
JavaScript41239872,271
Sass2046831,724
JSON1400771
Markdown9920145
Bourne Shell12111120
PO File191146
XML20034
CSS2417
YAML1006
SVG1003
INI1111

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 232)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity10.12
▷ Minimum class complexity1.00
▷ Maximum class complexity539.00
Average method complexity3.89
▷ Minimum method complexity1.00
▷ Maximum method complexity232.00
Code structure
Namespaces83
Interfaces18
Traits11
Classes770
▷ Abstract classes506.49%
▷ Concrete classes72093.51%
▷ Final classes00.00%
Methods2,707
▷ Static methods2198.09%
▷ Public methods2,30585.15%
▷ Protected methods2218.16%
▷ Private methods1816.69%
Functions220
▷ Named functions6830.91%
▷ Anonymous functions15269.09%
Constants135
▷ Global constants118.15%
▷ Class constants12491.85%
▷ Public constants124100.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 files were detected