84% wp-notification-center

Code Review | WP Notification Center

WordPress plugin WP Notification Center scored84%from 54 tests.

About plugin

  • Plugin page: wp-notification-c...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.3
  • WordPress version: 6.3.1
  • First release: Sep 11, 2015
  • Latest release: Aug 25, 2023
  • Number of updates: 9
  • Update frequency: every 322.8 days
  • Top authors: barrykooij (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

1,000+ active /26,077 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.10MB] [CPU: ▼6.48ms] Passed 4 tests

An overview of server-side resources used by WP Notification Center
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0943.49 ▲2.16
Dashboard /wp-admin3.42 ▲0.0753.42 ▼12.79
Posts /wp-admin/edit.php3.54 ▲0.1849.34 ▼3.63
Add New Post /wp-admin/post-new.php6.00 ▲0.1197.82 ▼9.70
Media Library /wp-admin/upload.php3.35 ▲0.1140.47 ▲0.19

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

WP Notification Center: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4114.38 ▼0.151.72 ▼0.0035.33 ▼11.77
Dashboard /wp-admin2,208 ▲285.67 ▼0.0188.61 ▼3.3041.02 ▼0.78
Posts /wp-admin/edit.php2,113 ▲131.97 ▼0.0635.19 ▼5.6937.81 ▲2.32
Add New Post /wp-admin/post-new.php1,535 ▲923.17 ▲0.11678.81 ▼1.3664.71 ▲3.45
Media Library /wp-admin/upload.php1,410 ▲104.19 ▲0.09104.26 ▼15.2949.27 ▼0.88

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 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
Please fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Interface 'Never5\\WPNotificationCenter\\Pimple\\ServiceProviderInterface' not found in wp-content/plugins/wp-notification-center/src/PluginServiceProvider.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PhpSpec\\ObjectBehavior' not found in wp-content/plugins/wp-notification-center/vendor/wpupdatephp/wp-update-php/spec/WPUpdatePhpSpec.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Never5\\WPNotificationCenter\\Pimple\\Container' not found in wp-content/plugins/wp-notification-center/src/Plugin.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: notices, admin notices, notification center, notifications, notice...

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

The entry point to "WP Notification Center" version 1.0.1 is a PHP file that has certain tags in its header comment area
92 characters long description:
Adds a notification center to WordPress, no more pages that are cluttered with notifications

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin795 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP18218492667
JSON20047
Sass18046
Markdown216034
CSS1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity7.15
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces1
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods64
▷ Static methods23.12%
▷ Public methods5992.19%
▷ Protected methods00.00%
▷ Private methods57.81%
Functions11
▷ Named functions654.55%
▷ Anonymous functions545.45%
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
PNG images were not found in this plugin