10% web-notification-bar

Code Review | Web Notification Bar

WordPress plugin Web Notification Bar scored10%from 54 tests.

About plugin

  • Plugin page: web-notification-bar
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.5
  • WordPress version: 6.3.1
  • First release: Aug 20, 2020
  • Latest release: Aug 20, 2020
  • Number of updates: 2
  • Update frequency: every 7.5 days
  • Top authors: farooq1191 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /335 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/web-notification-bar/index.php+52
    Undefined variable: test_db_version

Server metrics [RAM: ▲0.03MB] [CPU: ▼11.29ms] Passed 4 tests

A check of server-side resources used by Web Notification Bar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.44 ▼0.0231.99 ▼11.31
Dashboard /wp-admin3.36 ▲0.0252.54 ▼14.56
Posts /wp-admin/edit.php3.41 ▲0.0652.53 ▼0.92
Add New Post /wp-admin/post-new.php5.96 ▲0.0888.79 ▼18.35
Media Library /wp-admin/upload.php3.29 ▲0.0641.17 ▲3.88
Web Notification Bar /wp-admin/options-general.php?page=wooLiveSaleAdminMainPage3.2637.86

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 81 new files
Database: 1 new table, 7 new options
New tables
wp_web_notification_bar
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
test_db_version
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Web Notification Bar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,935 ▲16414.50 ▲0.566.16 ▲4.3639.46 ▲1.58
Dashboard /wp-admin2,223 ▲465.45 ▼0.1298.12 ▼1.0441.23 ▲2.21
Posts /wp-admin/edit.php2,133 ▲302.76 ▲0.7445.45 ▲3.4236.47 ▼1.03
Add New Post /wp-admin/post-new.php1,556 ▲2923.34 ▲0.14699.15 ▲22.9236.06 ▼20.19
Media Library /wp-admin/upload.php1,431 ▲315.26 ▲1.05104.53 ▲0.1845.10 ▲2.36
Web Notification Bar /wp-admin/options-general.php?page=wooLiveSaleAdminMainPage6,9482.9782.5640.75

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 tables were found after uninstall: 1 table
    • wp_web_notification_bar
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • test_db_version
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Please fix the following items
  • 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/web-notification-bar/admin/admin.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=wooLiveSaleAdminMainPage
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=wooLiveSaleAdminMainPage 181 The specified value "white" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/options-general.php?page=wooLiveSaleAdminMainPage
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=wooLiveSaleAdminMainPage 206 The specified value "white" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: notification, popup

web-notification-bar/index.php 92% from 13 tests

"Web Notification Bar" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("web-notification-bar.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin18,815 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
CSS7373548,574
SVG2003,356
Sass1638373,238
LESS1638493,226
PHP28233242
JavaScript36616179

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.10
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin