74% notification-widget

Code Review | Notification Widget

WordPress plugin Notification Widget scored 74% from 54 tests.

About plugin

  • Plugin page: notification-widget
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 5.9.2
  • First release: Feb 15, 2015
  • Latest release: Feb 20, 2015
  • Number of updates: 8
  • Update frequency: every 0.6 days
  • Top authors: AbroadPal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,808 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼295.09ms] Passed 4 tests

A check of server-side resources used by Notification Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0453.96 ▲3.77
Dashboard /wp-admin3.45 ▲0.0433.62 ▼0.15
Posts /wp-admin/edit.php3.68 ▲0.0437.80 ▼0.15
Add New Post /wp-admin/post-new.php6.92 ▼0.0591.44 ▼1,180.36
Media Library /wp-admin/upload.php3.33 ▲0.0425.66 ▲0.31

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 3 new files
Database: 1 new table, 1 new option
New tables
wp_noti_widget
New WordPress options
jal_db_version

Browser metrics Passed 4 tests

Notification Widget: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,783 ▲2916.20 ▲0.546.22 ▼0.112.36 ▼0.28
Dashboard /wp-admin2,908 ▲476.13 ▼0.01114.01 ▼19.13155.72 ▼11.73
Posts /wp-admin/edit.php2,708 ▲173.24 ▲0.0062.11 ▼9.88138.92 ▼5.94
Add New Post /wp-admin/post-new.php1,765 ▲721.10 ▼0.29467.93 ▲30.72156.00 ▼2.63
Media Library /wp-admin/upload.php1,712 ▲115.54 ▲0.08141.03 ▲1.53195.00 ▲8.29

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_noti_widget
  • Zombie WordPress options detected upon uninstall: 1 option
    • jal_db_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/notification-widget/notification_widget.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid URI found ("")
The official readme.txt might help

notification-widget/notification_widget.php 92% from 13 tests

The primary PHP file in "Notification Widget" version 1.0.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("notification-widget.php" instead of "notification_widget.php")

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
Everything looks great! No dangerous files found in this plugin263 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1748263

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.28
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
1412703669_96070.png11.89KB4.57KB▼ 61.53%