78% wp-notification-bell

Code Review | WP Notification Bell

WordPress plugin WP Notification Bell scored78%from 54 tests.

About plugin

  • Plugin page: wp-notification-bell
  • Plugin version: 1.3.27
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Oct 15, 2020
  • Latest release: Jul 6, 2023
  • Number of updates: 90
  • Update frequency: every 11.0 days
  • Top authors: wpdever (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

700+ active /13,660 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲5.18MB] [CPU: ▲21.40ms] 50% from 4 tests

A check of server-side resources used by WP Notification Bell
Please fix the following
  • CPU: Total CPU usage must kept under 500.00ms (currently 1,854.06ms on /wp-admin/edit.php?post_type=wnbell_notifications&page=wp-notification-bell-addons)
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 5.18MB on /wp-admin/edit.php?post_type=wnbell_notifications&page=wp-notification-bell-addons)
PageMemory (MB)CPU Time (ms)
Home /8.92 ▲5.4673.86 ▲32.09
Dashboard /wp-admin8.94 ▲5.5977.70 ▲10.06
Posts /wp-admin/edit.php8.94 ▲5.5892.05 ▲38.95
Add New Post /wp-admin/post-new.php9.99 ▲4.10123.76 ▲4.49
Media Library /wp-admin/upload.php8.94 ▲5.7183.75 ▲42.78
Upgrade  ➤ /wp-admin/edit.php?post_type=wnbell_notifications&page=wp-notification-bell-pricing8.9575.54
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius8.9471.70
Add New /wp-admin/post-new.php?post_type=wnbell_notifications8.9580.27
Settings /wp-admin/edit.php?post_type=wnbell_notifications&page=wnbell-sub-menu8.9568.27
All Notifications /wp-admin/edit.php?post_type=wnbell_notifications8.9570.69
Settings /wp-admin/admin.php?page=wp-notification-bell8.9462.52
Contact Us /wp-admin/admin.php?page=wp-notification-bell-contact8.9465.12
Support Forum /wp-admin/admin.php?page=wp-notification-bell-wp-support-forum8.9455.40
Add-Ons /wp-admin/edit.php?post_type=wnbell_notifications&page=wp-notification-bell-addons8.951,854.06

Server storage [IO: ▲3.40MB] [DB: ▲0.03MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
These are issues you should consider
  • Illegal file modification found: 1 file (0.00KB) outside of "wp-content/plugins/wp-notification-bell/" and "wp-content/uploads/"
    • (new file) wp-content/logs/wnbell/.empty
Filesystem: 203 new files
Database: 2 new tables, 12 new options
New tables
wp_wnbell_recipients_role
wp_wnbell_recipients
New WordPress options
widget_recent-posts
fs_debug_mode
wnbell_change_metakeys_complete
db_upgraded
fs_active_plugins
wnbell_db_version
widget_recent-comments
fs_accounts
wnbell_options
theysaidso_admin_options
...

Browser metrics Passed 4 tests

Checking browser requirements for WP Notification Bell
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,959 ▲21313.42 ▼0.798.58 ▲6.8038.97 ▲0.41
Dashboard /wp-admin2,241 ▲675.57 ▼0.0998.12 ▲3.6545.75 ▲4.20
Posts /wp-admin/edit.php2,143 ▲401.98 ▼0.0741.02 ▼3.8040.42 ▲4.04
Add New Post /wp-admin/post-new.php1,628 ▲9121.36 ▲2.98665.33 ▼25.1058.35 ▼2.62
Media Library /wp-admin/upload.php1,449 ▲524.19 ▼0.19111.53 ▲7.4754.22 ▲7.73
Upgrade  ➤ /wp-admin/edit.php?post_type=wnbell_notifications&page=wp-notification-bell-pricing2,1963.3264.73111.58
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,1101.7025.1533.94
Add New /wp-admin/post-new.php?post_type=wnbell_notifications1,7673.6161.8234.54
Settings /wp-admin/edit.php?post_type=wnbell_notifications&page=wnbell-sub-menu1,3521.6927.1836.52
All Notifications /wp-admin/edit.php?post_type=wnbell_notifications1,1241.9029.6234.86
Settings /wp-admin/admin.php?page=wp-notification-bell1,3511.6825.8930.82
Contact Us /wp-admin/admin.php?page=wp-notification-bell-contact1,6083.1553.7133.53
Support Forum /wp-admin/admin.php?page=wp-notification-bell-wp-support-forum2,7754.0189.52102.04
Add-Ons /wp-admin/edit.php?post_type=wnbell_notifications&page=wp-notification-bell-addons1,2132.6343.9838.83

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/wp-notification-bell/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_recent-comments
    • fs_debug_mode
    • db_upgraded
    • can_compress_scripts
    • fs_accounts
    • theysaidso_admin_options
    • fs_active_plugins
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
No output text or server-side errors detected on direct access of PHP files

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 93% from 29 tests

readme.txt 88% from 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
These attributes need your attention:
  • Screenshots: These screenshots need descriptions #10, #11, #12, #13, #14, #15, #9 in wp-notification-bell/assets to your readme.txt
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt is a good inspiration

wp-notification-bell/wp-notification-bell.php Passed 13 tests

The main PHP file in "WP Notification Bell" ver. 1.3.27 adds more information about the plugin and also serves as the entry point for this plugin
28 characters long description:
On-site notification system.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin39,896 lines of code in 158 files:
LanguageFilesBlank linesComment linesLines of code
PHP1378,53217,66838,909
CSS1548149484
JavaScript55176331
PO File16883172

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity93.06
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.59
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes48
▷ Abstract classes24.17%
▷ Concrete classes4695.83%
▷ Final classes00.00%
Methods1,259
▷ Static methods19715.65%
▷ Public methods87069.10%
▷ Protected methods171.35%
▷ Private methods37229.55%
Functions190
▷ Named functions18999.47%
▷ Anonymous functions10.53%
Constants147
▷ Global constants10068.03%
▷ Class constants4731.97%
▷ Public constants47100.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.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%