84% easy-sticky-notification-bar

Code Review | WordPress Easy Sticky Notification Bar

WordPress plugin WordPress Easy Sticky Notification Bar scored84%from 54 tests.

About plugin

  • Plugin page: easy-sticky-notif...
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.8.1
  • WordPress version: 6.3.1
  • First release: Jun 6, 2014
  • Latest release: Sep 10, 2017
  • Number of updates: 27
  • Update frequency: every 44.2 days
  • Top authors: designorbital (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

70+ active /6,393 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.14MB] [CPU: ▼3.10ms] Passed 4 tests

An overview of server-side resources used by WordPress Easy Sticky Notification Bar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0838.15 ▲1.50
Dashboard /wp-admin3.46 ▲0.1652.90 ▼0.54
Posts /wp-admin/edit.php3.57 ▲0.2249.37 ▲2.92
Add New Post /wp-admin/post-new.php6.04 ▲0.1586.97 ▼16.27
Media Library /wp-admin/upload.php3.38 ▲0.1537.56 ▲4.17
Easy Sticky Notification Bar /wp-admin/options-general.php?page=do-esnb-options3.3733.02

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

WordPress Easy Sticky Notification Bar: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲5114.24 ▼0.111.79 ▲0.1469.75 ▲26.78
Dashboard /wp-admin2,202 ▲225.57 ▼0.0599.65 ▲11.0242.15 ▲2.01
Posts /wp-admin/edit.php2,104 ▲42.02 ▼0.0138.58 ▲3.7736.59 ▲0.81
Add New Post /wp-admin/post-new.php1,529 ▼823.61 ▲5.41674.89 ▲33.2254.95 ▼15.44
Media Library /wp-admin/upload.php1,404 ▲44.22 ▲0.0295.32 ▼3.6440.69 ▼3.76
Easy Sticky Notification Bar /wp-admin/options-general.php?page=do-esnb-options1,9262.0227.5932.11

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/easy-sticky-notification-bar/inc/settings-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/easy-sticky-notification-bar/easy-sticky-notification-bar.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-sticky-notification-bar/inc/admin.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/easy-sticky-notification-bar/inc/extras.php:124

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 93% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

easy-sticky-notification-bar/easy-sticky-notification-bar.php 92% from 13 tests

The primary PHP file in "WordPress Easy Sticky Notification Bar" version 0.4 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; 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 programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin910 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP4167213587
JavaScript25445168
CSS22017155

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions32
▷ Named functions32100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin