84% notifications

Code Review | Notifications

WordPress plugin Notifications scored84%from 54 tests.

About plugin

  • Plugin page: notifications
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9.1
  • WordPress version: 6.3.1
  • First release: Feb 4, 2013
  • Latest release: Jun 5, 2014
  • Number of updates: 8
  • Update frequency: every 60.9 days
  • Top authors: jazzs3quence (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active /3,433 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

Analyzing server-side resources used by Notifications
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.92 ▼5.21
Dashboard /wp-admin3.37 ▲0.0748.45 ▼3.86
Posts /wp-admin/edit.php3.42 ▲0.0753.65 ▲4.01
Add New Post /wp-admin/post-new.php5.95 ▲0.0795.57 ▼4.94
Media Library /wp-admin/upload.php3.29 ▲0.0737.00 ▲2.23
Options /wp-admin/edit.php?post_type=notf_notifications&page=notf_settings3.2832.83
Add New /wp-admin/post-new.php?post_type=notf_notifications3.3342.42
Notifications /wp-admin/edit.php?post_type=notf_notifications3.3440.00

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Notifications
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8414.17 ▼0.202.00 ▲0.3845.75 ▲3.72
Dashboard /wp-admin2,226 ▲645.55 ▼0.1185.29 ▼6.6438.52 ▼5.77
Posts /wp-admin/edit.php2,137 ▲481.96 ▼0.0236.31 ▼1.0635.91 ▲4.01
Add New Post /wp-admin/post-new.php1,569 ▲5518.11 ▼5.11644.59 ▼51.4254.27 ▼3.88
Media Library /wp-admin/upload.php1,428 ▲344.24 ▲0.0596.36 ▼13.9942.08 ▼3.30
Options /wp-admin/edit.php?post_type=notf_notifications&page=notf_settings1,0022.0025.6445.00
Add New /wp-admin/post-new.php?post_type=notf_notifications1,4362.4748.4768.56
Notifications /wp-admin/edit.php?post_type=notf_notifications1,0981.9630.6630.94

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means 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
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/notifications/notifications.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/notifications/notifications.php:18

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
There were not plugin tags detected

notifications/notifications.php Passed 13 tests

The entry point to "Notifications" version 1.1.3 is a PHP file that has certain tags in its header comment area
56 characters long description:
Easy, customizable notifications for your WordPress site

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 detected545 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP232183344
CSS100163
Markdown124038

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/notification32.png2.14KB1.27KB▼ 40.72%
img/notification16-inv.png1.42KB0.59KB▼ 58.26%
img/notification16.png1.41KB0.58KB▼ 58.71%