68% 8-degree-notification-bar

Code Review | Notification Bar for WordPress

WordPress plugin Notification Bar for WordPress scored 68% from 54 tests.

About plugin

  • Plugin page: 8-degree-notifica...
  • Plugin version: 1.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.9.2
  • WordPress version: 5.9.2
  • First release: Aug 28, 2015
  • Latest release: Aug 10, 2018
  • Number of updates: 32
  • Update frequency: every 33.8 days
  • Top authors: 8degreethemes (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

3,000+ active / 83,464 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.14MB] [CPU: ▼320.98ms] Passed 4 tests

Server-side resources used by Notification Bar for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.2662.78 ▲12.54
Dashboard /wp-admin3.58 ▲0.1733.54 ▼53.71
Posts /wp-admin/edit.php3.80 ▲0.1638.66 ▼51.53
Add New Post /wp-admin/post-new.php7.04 ▲0.0793.67 ▼1,185.21
Media Library /wp-admin/upload.php3.45 ▲0.1634.94 ▲6.55

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 33 new files
Database: 1 new table, 2 new options
New tables
wp_edn_subscriber
New WordPress options
edn_fonts
edn_settings

Browser metrics Passed 4 tests

An overview of browser requirements for Notification Bar for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,961 ▲23916.63 ▲1.0211.70 ▲5.643.34 ▲1.13
Dashboard /wp-admin2,910 ▲496.16 ▼0.02162.01 ▲30.42172.53 ▲6.78
Posts /wp-admin/edit.php2,713 ▲253.24 ▲0.0061.87 ▼8.51136.29 ▼11.29
Add New Post /wp-admin/post-new.php1,705 ▲4421.57 ▲6.28473.73 ▲62.91185.68 ▲28.72
Media Library /wp-admin/upload.php1,720 ▲225.52 ▼0.02149.20 ▼33.93199.69 ▲8.91

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_edn_subscriber
  • This plugin does not fully uninstall, leaving 2 options in the database
    • edn_fonts
    • edn_settings

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/8-degree-notification-bar/inc/backend/blocks/export-csv.php
    • > /wp-content/plugins/8-degree-notification-bar/8degree-notification.php
    • > /wp-content/plugins/8-degree-notification-bar/inc/backend/save-settings.php
    • > /wp-content/plugins/8-degree-notification-bar/inc/backend/settings-page.php
    • > /wp-content/plugins/8-degree-notification-bar/inc/frontend/frontend.php
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/8-degree-notification-bar/inc/backend/blocks/display-settings.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/8-degree-notification-bar/inc/backend/blocks/about.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/8-degree-notification-bar/inc/backend/blocks/how-to-use.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/8-degree-notification-bar/inc/backend/blocks/general-settings.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/8-degree-notification-bar/inc/backend/blocks/subscribe-settings.php:17

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 13 tag instead of maximum 10
Please take inspiration from this readme.txt

8-degree-notification-bar/8degree-notification.php 85% from 13 tests

"Notification Bar for WordPress" version 1.1.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("8-degree-notification-bar.php" instead of "8degree-notification.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected5,501 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
CSS5105873,481
PHP11872531,174
SVG100565
JavaScript43344281

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
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/controls.png2.74KB1.42KB▼ 48.29%