80% tiny-bar

Code Review | WordPress Notification Bar Plugin - TinyBar

WordPress plugin WordPress Notification Bar Plugin - TinyBar scored80%from 54 tests.

About plugin

  • Plugin page: tiny-bar
  • Plugin version: 2.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3
  • WordPress version: 6.3.1
  • First release: Feb 16, 2019
  • Latest release: Aug 15, 2023
  • Number of updates: 76
  • Update frequency: every 21.6 days
  • Top authors: mhmrajib (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /7,105 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲4.81MB] [CPU: ▲22.05ms] Passed 4 tests

A check of server-side resources used by WordPress Notification Bar Plugin - TinyBar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /8.90 ▲5.1667.55 ▲21.91
Dashboard /wp-admin8.92 ▲5.3579.71 ▲21.54
Posts /wp-admin/edit.php8.92 ▲5.2487.37 ▲34.12
Add New Post /wp-admin/post-new.php9.62 ▲3.47114.53 ▲10.62
Media Library /wp-admin/upload.php8.92 ▲5.4377.11 ▲39.67
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius8.9266.39

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 225 new files
Database: no new tables, 11 new options
New WordPress options
fs_accounts
hmtb_display_type
widget_theysaidso_widget
theysaidso_admin_options
fs_active_plugins
db_upgraded
widget_recent-posts
hmtb_display_option
widget_recent-comments
can_compress_scripts
...

Browser metrics Passed 4 tests

WordPress Notification Bar Plugin - TinyBar: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,120 ▲34915.09 ▲0.897.35 ▲5.2332.93 ▼12.11
Dashboard /wp-admin2,388 ▲2116.40 ▲0.73119.15 ▲15.8244.90 ▲2.66
Posts /wp-admin/edit.php2,317 ▲2173.52 ▲1.5352.19 ▲15.4936.65 ▲1.12
Add New Post /wp-admin/post-new.php1,720 ▲18522.86 ▼0.50727.28 ▲87.4635.64 ▼21.47
Media Library /wp-admin/upload.php1,459 ▲564.36 ▲0.1786.86 ▼18.3648.31 ▼0.46
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,2973.3441.6028.26

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/tiny-bar/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • fs_debug_mode
    • fs_active_plugins
    • can_compress_scripts
    • theysaidso_admin_options
    • fs_accounts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: floating bar, notification bar, bottom bar, notification, top bar

tiny-bar/tiny-bar.php Passed 13 tests

Analyzing the main PHP file in "WordPress Notification Bar Plugin - TinyBar" version 2.2
139 characters long description:
TinyBar displays a notification bar to your website. You can place it top or bottom of your webpage. It overlaps and hides when you scroll.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected35,407 lines of code in 159 files:
LanguageFilesBlank linesComment linesLines of code
PHP1358,15317,25634,479
CSS178112483
JavaScript68172367
PO File1313378

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity80.62
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.53
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits4
Classes52
▷ Abstract classes23.85%
▷ Concrete classes5096.15%
▷ Final classes00.00%
Methods1,293
▷ Static methods19715.24%
▷ Public methods88768.60%
▷ Protected methods302.32%
▷ Private methods37629.08%
Functions103
▷ Named functions103100.00%
▷ Anonymous functions00.00%
Constants153
▷ Global constants10669.28%
▷ Class constants4730.72%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%