84% b-laser

Code Review | B Laser Loader - Smooth page loading progress bar

WordPress plugin B Laser Loader - Smooth page loading progress bar scored84%from 54 tests.

About plugin

  • Plugin page: b-laser
  • Plugin version: 1.5.1
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Feb 17, 2021
  • Latest release: Sep 11, 2023
  • Number of updates: 33
  • Update frequency: every 28.4 days
  • Top authors: abuhayat (54.55%)shehabulislam (48.48%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /1,595 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.35MB] [CPU: ▲2.46ms] Passed 4 tests

An overview of server-side resources used by B Laser Loader - Smooth page loading progress bar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.87 ▲1.4046.30 ▲3.92
Dashboard /wp-admin4.70 ▲1.3559.03 ▼3.39
Posts /wp-admin/edit.php4.75 ▲1.3961.32 ▲12.21
Add New Post /wp-admin/post-new.php7.22 ▲1.3398.81 ▼2.92
Media Library /wp-admin/upload.php4.56 ▲1.3351.70 ▲16.37
B Laser /wp-admin/tools.php?page=blaser4.5653.85

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 160 new files
Database: no new tables, 7 new options
New WordPress options
_wpll
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for B Laser Loader - Smooth page loading progress bar
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,253 ▲50713.59 ▼1.166.27 ▲4.5939.62 ▼4.00
Dashboard /wp-admin2,210 ▲224.85 ▼0.0299.51 ▼5.6538.84 ▼3.91
Posts /wp-admin/edit.php2,093 ▲42.03 ▲0.0440.18 ▼2.2536.42 ▼1.43
Add New Post /wp-admin/post-new.php1,536 ▼123.38 ▲5.26669.12 ▲44.0657.79 ▲6.74
Media Library /wp-admin/upload.php1,395 ▲74.18 ▼0.1296.73 ▼1.9843.98 ▼0.85
B Laser /wp-admin/tools.php?page=blaser1,2684.3068.4742.62

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • _wpll
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 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 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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/b-laser/b-laser-loader.php:15

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please describe screenshot #1 in b-laser/assets to your readme.txt
Please take inspiration from this readme.txt

b-laser/b-laser-loader.php 92% from 13 tests

The principal PHP file in "B Laser Loader - Smooth page loading progress bar" v. 1.5.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("b-laser.php" instead of "b-laser-loader.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected33,105 lines of code in 134 files:
LanguageFilesBlank linesComment linesLines of code
PHP863,3331,43114,049
PO File203,0373,4146,180
Sass1595234,811
CSS52834794,099
JavaScript61,2473483,964
SVG2002

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity25.28
▷ Minimum class complexity1.00
▷ Maximum class complexity152.00
Average method complexity6.85
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes61
▷ Abstract classes23.28%
▷ Concrete classes5996.72%
▷ Final classes00.00%
Methods253
▷ Static methods4116.21%
▷ Public methods253100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions23100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/framework/assets/images/checkerboard.png2.29KB2.54KB0.00%