84% notification-bar-builder-for-elementor

Code Review | Notification Bar Builder for Elementor

WordPress plugin Notification Bar Builder for Elementor scored84%from 54 tests.

About plugin

  • Plugin page: notification-bar-...
  • Plugin version: 1.0.3
  • PHP compatiblity: 4.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7
  • WordPress version: 6.3.1
  • First release: Nov 4, 2020
  • Latest release: Mar 30, 2021
  • Number of updates: 6
  • Update frequency: every 24.5 days
  • Top authors: azplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,345 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.02MB] [CPU: ▼6.46ms] Passed 4 tests

Analyzing server-side resources used by Notification Bar Builder for Elementor
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.25 ▼8.94
Dashboard /wp-admin3.34 ▼0.0147.46 ▼11.58
Posts /wp-admin/edit.php3.39 ▲0.0344.37 ▼2.11
Add New Post /wp-admin/post-new.php5.92 ▲0.0393.70 ▼3.19
Media Library /wp-admin/upload.php3.26 ▲0.0336.14 ▲1.67

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Notification Bar Builder for Elementor
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7214.48 ▲0.101.75 ▼0.0741.21 ▼0.73
Dashboard /wp-admin2,221 ▲335.81 ▼0.02101.67 ▼14.6541.68 ▼3.79
Posts /wp-admin/edit.php2,106 ▲172.01 ▲0.0137.82 ▼0.4037.64 ▲3.00
Add New Post /wp-admin/post-new.php1,527 ▲817.65 ▼5.54642.35 ▼19.1854.59 ▼4.10
Media Library /wp-admin/upload.php1,400 ▲154.20 ▼0.1099.92 ▼1.3244.32 ▲0.91

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

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)
Good news, no errors were detected

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
The following issues need your attention
  • 2× 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-bar-builder-for-elementor/includes/document-controls.php:192
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/notification-bar-builder-for-elementor/includes/custom-posts.php:45

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: announcement bar, notice, notification, elementor, bar

notification-bar-builder-for-elementor/plugin-main.php 85% from 13 tests

"Notification Bar Builder for Elementor" version 1.0.3'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:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("notification-bar-builder-for-elementor.php" instead of "plugin-main.php")

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
There were no executable files found in this plugin1,079 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP716377949
CSS281087
JavaScript28543

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity11.50
▷ Minimum class complexity8.00
▷ Maximum class complexity15.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods18
▷ Static methods211.11%
▷ Public methods1583.33%
▷ Protected methods316.67%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin