10% lightweight-loading-bar

Code Review | Lightweight Loading Bar

WordPress plugin Lightweight Loading Bar scored10%from 54 tests.

About plugin

  • Plugin page: lightweight-loadi...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8.0-5.0
  • WordPress version: 6.3.1
  • First release: Oct 24, 2018
  • Latest release: Nov 17, 2018
  • Number of updates: 16
  • Update frequency: every 1.6 days
  • Top authors: sospiremedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /689 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/lightweight-loading-bar/lw-loading-bar.php+21
    Undefined variable: enable_on_mobile

Server metrics [RAM: ▼0.01MB] [CPU: ▼7.62ms] Passed 4 tests

A check of server-side resources used by Lightweight Loading Bar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.49 ▲1.67
Dashboard /wp-admin3.31 ▼0.0449.14 ▼12.27
Posts /wp-admin/edit.php3.36 ▲0.0048.43 ▲4.82
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.83 ▼12.77
Media Library /wp-admin/upload.php3.23 ▲0.0031.91 ▼7.12

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Lightweight Loading Bar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲10113.25 ▼1.114.30 ▲2.6946.04 ▲3.84
Dashboard /wp-admin2,206 ▲184.85 ▼1.0097.07 ▼7.1435.02 ▼9.10
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0138.86 ▲1.1434.16 ▼2.37
Add New Post /wp-admin/post-new.php1,533 ▲1923.14 ▲5.69662.31 ▼14.3057.17 ▲4.41
Media Library /wp-admin/upload.php1,382 ▼34.19 ▼0.1299.08 ▼1.2142.33 ▼1.05

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/lightweight-loading-bar/lw-loading-bar.php

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: Too many tags (26 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

lightweight-loading-bar/lw-loading-bar.php 92% from 13 tests

"Lightweight Loading Bar" version 1.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("lightweight-loading-bar.php" instead of "lw-loading-bar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin66 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP4415866

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin