83% intelly-welcome-bar

Code Review | Welcome Bar

WordPress plugin Welcome Bar scored 83% from 54 tests.

About plugin

  • Plugin page: intelly-welcome-bar
  • Plugin version: 2.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-6.2
  • WordPress version: 6.3.1
  • First release: Jan 16, 2016
  • Latest release: Mar 30, 2023
  • Number of updates: 25
  • Update frequency: every 105.3 days
  • Top authors: IntellyWP (96%)data443 (8%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 5,332 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
Installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▲0.42ms] Passed 4 tests

This is a short check of server-side resources used by Welcome Bar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1251.39 ▲4.08
Dashboard /wp-admin3.47 ▲0.17106.18 ▲55.18
Posts /wp-admin/edit.php3.51 ▲0.1553.15 ▼2.32
Add New Post /wp-admin/post-new.php5.97 ▲0.0998.07 ▲3.75
Media Library /wp-admin/upload.php3.32 ▲0.0938.44 ▼3.83
Welcome Bar /wp-admin/options-general.php?page=intelly-welcome-bar3.3349.67

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 178 new files
Database: no new tables, 14 new options
New WordPress options
widget_recent-comments
IWB_TrackingEnable
can_compress_scripts
IWB_PluginSettings
widget_theysaidso_widget
IWB_PluginInstallDate[intelly-welcome-bar]
db_upgraded
IWB_PluginUpdateDate[intelly-welcome-bar]
theysaidso_admin_options
IWB_ShowActivationNotice
...

Browser metrics Passed 4 tests

Checking browser requirements for Welcome Bar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲8513.58 ▼0.838.17 ▲6.0139.85 ▼4.66
Dashboard /wp-admin2,213 ▲104.87 ▲0.02109.65 ▼1.5339.82 ▼4.72
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0140.61 ▼1.5435.52 ▼0.23
Add New Post /wp-admin/post-new.php1,536 ▼723.14 ▲0.26701.51 ▲8.6159.37 ▼5.71
Media Library /wp-admin/upload.php1,395 ▲44.20 ▲0.0198.12 ▼3.7341.39 ▼2.70
Welcome Bar /wp-admin/options-general.php?page=intelly-welcome-bar1,4756.01125.0681.61

Uninstaller [IO: ✅] [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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 15 options
    • IWB_Active
    • IWB_PluginFirstInstall
    • IWB_PluginInstallDate[intelly-welcome-bar]
    • widget_recent-posts
    • IWB_ShowWhatsNew
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • IWB_TrackingLastSend[intelly-welcome-bar]
    • db_upgraded
    • IWB_PluginSettings
    • ...

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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'IWB_Options' not found in wp-content/plugins/intelly-welcome-bar/includes/classes/utils/PluginOptions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/intelly-welcome-bar/includes/classes/session/session.php:78
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/intelly-welcome-bar/includes/install.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/intelly-welcome-bar/includes/core.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'IWB_Recursive_ArrayAccess' not found in wp-content/plugins/intelly-welcome-bar/includes/classes/session/class-session.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_deactivation_hook() in wp-content/plugins/intelly-welcome-bar/includes/uninstall.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/intelly-welcome-bar/index.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Welcome Bar manager), #2 (Welcome Bar Builder (part 1)), #3 (Welcome Bar Builder (part 2))
  • Tags: There are too many tags (23 tag instead of maximum 10)
Please take inspiration from this readme.txt

intelly-welcome-bar/index.php 92% from 13 tests

The entry point to "Welcome Bar" version 2.0.4 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("intelly-welcome-bar.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected62,033 lines of code in 120 files:
LanguageFilesBlank linesComment linesLines of code
CSS131052,07531,329
JavaScript594,5342,39420,773
PHP346397938,963
Sass121697605
SVG100288
HTML138375

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity74.61
▷ Minimum class complexity1.00
▷ Maximum class complexity586.00
Average method complexity4.48
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes23
▷ Abstract classes00.00%
▷ Concrete classes23100.00%
▷ Final classes14.35%
Methods487
▷ Static methods10.21%
▷ Public methods42988.09%
▷ Protected methods255.13%
▷ Private methods336.78%
Functions36
▷ Named functions36100.00%
▷ Anonymous functions00.00%
Constants60
▷ Global constants4371.67%
▷ Class constants1728.33%
▷ Public constants17100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
27 PNG files occupy 0.72MB with 0.45MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/simple-arrow.png1.26KB0.24KB▼ 80.72%
assets/images/accept-tos.png95.79KB25.60KB▼ 73.27%
screenshot-1.png123.09KB47.66KB▼ 61.28%
assets/images/select-all.png0.68KB0.37KB▼ 45.45%
assets/deps/colorpicker/img/bootstrap-colorpicker/alpha-horizontal.png3.55KB1.62KB▼ 54.44%