84% wp-notifications-manager

Code Review | WP Notifications Manager

WordPress plugin WP Notifications Manager scored84%from 54 tests.

About plugin

  • Plugin page: wp-notifications-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.9
  • WordPress version: 6.3.1
  • First release: Feb 12, 2014
  • Latest release: Apr 22, 2014
  • Number of updates: 4
  • Update frequency: every 17.2 days
  • Top authors: c.anderson3 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /1,669 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼9.79ms] Passed 4 tests

An overview of server-side resources used by WP Notifications Manager
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0440.48 ▼4.45
Dashboard /wp-admin3.36 ▲0.0249.33 ▼11.14
Posts /wp-admin/edit.php3.41 ▲0.0645.21 ▼9.73
Add New Post /wp-admin/post-new.php5.94 ▲0.0682.60 ▼13.84
Media Library /wp-admin/upload.php3.28 ▲0.0637.60 ▼0.49
WP Notifications Manager /wp-admin/options-general.php?page=wpnm3.2533.40

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
wpnm_enable_password_change_notification
widget_recent-comments
can_compress_scripts
wpnm_enable_user_registration_notification

Browser metrics Passed 4 tests

WP Notifications Manager: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.30 ▲0.071.87 ▼0.0739.98 ▼3.50
Dashboard /wp-admin2,199 ▲255.64 ▲0.0888.13 ▼11.4338.74 ▼5.05
Posts /wp-admin/edit.php2,104 ▲12.05 ▼0.0040.94 ▼0.5237.90 ▲1.36
Add New Post /wp-admin/post-new.php1,548 ▲2223.64 ▲5.81661.50 ▲8.9451.97 ▼4.19
Media Library /wp-admin/upload.php1,404 ▲44.29 ▲0.0798.57 ▼2.9343.44 ▼2.69
WP Notifications Manager /wp-admin/options-general.php?page=wpnm8322.0327.4526.74

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/wp-notifications-manager/wp-notifications-manager.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-notifications-manager/options.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 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
3 plugin tags: password change, notifications, new user registration

wp-notifications-manager/wp-notifications-manager.php 92% from 13 tests

"WP Notifications Manager" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 193 characters long)

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
Everything looks great! No dangerous files found in this plugin250 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP373158250

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.27
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%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin