84% notification-popup

Code Review | Notification Popup

WordPress plugin Notification Popup scored84%from 54 tests.

About plugin

  • Plugin page: notification-popup
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9
  • WordPress version: 6.3.1
  • First release: Feb 6, 2014
  • Latest release: Apr 19, 2014
  • Number of updates: 19
  • Update frequency: every 4.5 days
  • Top authors: Nitin Dhiran (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /4,466 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.01MB] [CPU: ▼2.06ms] Passed 4 tests

An overview of server-side resources used by Notification Popup
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.44 ▲1.93
Dashboard /wp-admin3.32 ▲0.0146.16 ▼8.06
Posts /wp-admin/edit.php3.37 ▲0.0146.69 ▲1.27
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.79 ▼3.37
Media Library /wp-admin/upload.php3.24 ▲0.0136.72 ▲2.74

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
notificationpopup_options

Browser metrics Passed 4 tests

Notification Popup: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,969 ▲21213.97 ▼0.626.55 ▲4.4344.22 ▲1.95
Dashboard /wp-admin2,242 ▲545.23 ▼0.6799.32 ▼3.8487.11 ▲46.54
Posts /wp-admin/edit.php2,133 ▲412.29 ▲0.2438.15 ▼3.3336.61 ▲1.02
Add New Post /wp-admin/post-new.php1,702 ▲18323.20 ▼0.05617.58 ▼71.4633.60 ▼28.76
Media Library /wp-admin/upload.php1,427 ▲424.46 ▲0.2395.43 ▼7.6471.94 ▲25.83

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
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • notificationpopup_options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/notification-popup/notification-popup.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
10 plugin tags: notification popup, popup notification, popup, notify users, notification lightbox...

notification-popup/notification-popup.php 92% from 13 tests

The entry point to "Notification Popup" version 1.0.4 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 142 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
There were no executable files found in this plugin302 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13335287
CSS10212
JavaScript1023

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/popup.png0.49KB0.41KB▼ 15.46%
images/close.png4.90KB1.66KB▼ 66.06%
images/bg.png0.90KB0.09KB▼ 89.69%