90% dobar

Code Review | DoBar - A Beautiful Loading Bar for WordPress

WordPress plugin DoBar - A Beautiful Loading Bar for WordPress scored90%from 54 tests.

About plugin

  • Plugin page: dobar
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Jan 5, 2021
  • Latest release: May 27, 2022
  • Number of updates: 5
  • Update frequency: every 101.6 days
  • Top authors: wpdo5ea (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /915 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.15MB] [CPU: ▼0.20ms] Passed 4 tests

Analyzing server-side resources used by DoBar - A Beautiful Loading Bar for WordPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1540.47 ▲0.14
Dashboard /wp-admin3.46 ▲0.1553.57 ▲5.56
Posts /wp-admin/edit.php3.57 ▲0.2154.53 ▲4.92
Add New Post /wp-admin/post-new.php6.03 ▲0.1498.86 ▼6.85
Media Library /wp-admin/upload.php3.38 ▲0.1540.45 ▲0.97
DoBar /wp-admin/options-general.php?page=dobar3.3746.95

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 191 new files
Database: no new tables, 13 new options
New WordPress options
dobar.style
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
dobar.inline
dobar.color
can_compress_scripts
dobar.frontend
widget_recent-posts
dobar.backend
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for DoBar - A Beautiful Loading Bar for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲8314.74 ▼0.018.65 ▲6.8139.71 ▼4.30
Dashboard /wp-admin2,214 ▲375.78 ▲0.2390.11 ▼1.0339.77 ▼4.26
Posts /wp-admin/edit.php2,122 ▲252.27 ▲0.2146.44 ▲10.1237.77 ▲5.22
Add New Post /wp-admin/post-new.php1,554 ▲923.35 ▲0.28692.31 ▲3.5854.50 ▼2.25
Media Library /wp-admin/upload.php1,416 ▲164.36 ▲0.15111.01 ▼7.3943.77 ▼4.25
DoBar /wp-admin/options-general.php?page=dobar1,8465.5385.0674.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 13 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • dobar.backend
    • widget_theysaidso_widget
    • dobar.auto_upgrade
    • dobar.frontend
    • dobar._ver
    • widget_recent-posts
    • dobar.color
    • ...

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: progress bar, loader, page loading, loading process bar, loading screen

dobar/dobar.php Passed 13 tests

The main PHP script in "DoBar - A Beautiful Loading Bar for WordPress" version 1.2 is automatically included on every request by WordPress
34 characters long description:
WordPress page loading process bar

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin17,593 lines of code in 186 files:
LanguageFilesBlank linesComment linesLines of code
CSS1681,59528815,877
JavaScript312423920
PHP15206381796

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.47
Average class complexity11.64
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes11
▷ Abstract classes19.09%
▷ Concrete classes1090.91%
▷ Final classes00.00%
Methods52
▷ Static methods2548.08%
▷ Public methods4484.62%
▷ Protected methods11.92%
▷ Private methods713.46%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants425.00%
▷ Class constants1275.00%
▷ Public constants12100.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
3 PNG files occupy 0.34MB with 0.25MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
wp_assets/screenshot-1.png212.17KB56.24KB▼ 73.50%
wp_assets/screenshot-2.png128.19KB36.99KB▼ 71.15%
wp_assets/icon-256x256.png8.27KB1.92KB▼ 76.83%