84% stylish-notification-popup

Code Review | Stylish Notification Popup

WordPress plugin Stylish Notification Popup scored84%from 54 tests.

About plugin

  • Plugin page: stylish-notificat...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.7.2
  • WordPress version: 6.3.1
  • First release: Nov 18, 2015
  • Latest release: Feb 6, 2017
  • Number of updates: 8
  • Update frequency: every 55.9 days
  • Top authors: shrinitech (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /3,266 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼2.86ms] Passed 4 tests

Analyzing server-side resources used by Stylish Notification Popup
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0740.03 ▼1.02
Dashboard /wp-admin3.37 ▲0.0745.81 ▼4.18
Posts /wp-admin/edit.php3.48 ▲0.1346.66 ▼7.12
Add New Post /wp-admin/post-new.php5.97 ▲0.0893.12 ▲8.18
Media Library /wp-admin/upload.php3.29 ▲0.0635.07 ▲0.90
Stylish Notification Popup /wp-admin/options-general.php?page=stylish-notification-popup-settings3.2632.61

Server storage [IO: ▲0.22MB] [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: 13 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
stylish_notification_popup_settings
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Stylish Notification Popup
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,961 ▲22613.77 ▼0.827.34 ▲5.2842.57 ▼5.49
Dashboard /wp-admin2,231 ▲435.11 ▲0.20106.08 ▼13.6040.61 ▼5.78
Posts /wp-admin/edit.php2,116 ▲272.33 ▲0.2938.39 ▲1.5134.72 ▲0.10
Add New Post /wp-admin/post-new.php1,542 ▼018.15 ▼0.34605.07 ▼51.8633.66 ▼18.11
Media Library /wp-admin/upload.php1,416 ▲344.43 ▲0.2198.21 ▼1.8642.88 ▼0.95
Stylish Notification Popup /wp-admin/options-general.php?page=stylish-notification-popup-settings1,0321.9729.2331.51

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • stylish_notification_popup_settings
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/stylish-notification-popup/stylish-notification-popup.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Donate link: Please fix this invalid url: ""
You can take inspiration from this readme.txt

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

This is the main PHP file of "Stylish Notification Popup" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 175 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected3,292 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
CSS3515132,896
PHP210035282
SVG10097
JavaScript22017

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity6.50
▷ Minimum class complexity6.00
▷ Maximum class complexity7.00
Average method complexity1.58
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/close.png1.18KB0.27KB▼ 76.83%