94% simple-reading-progress-bar

Code Review | Simple Reading Progress Bar

WordPress plugin Simple Reading Progress Bar scored 94% from 54 tests.

About plugin

  • Plugin page: simple-reading-pr...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.4.2
  • WordPress version: 5.8.1
  • First release: Jun 26, 2020
  • Latest release: Jun 28, 2020
  • Number of updates: 5
  • Update frequency: every 1.0 days
  • Top authors: oscarssanchez (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 259 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼145.30ms] Passed 4 tests

This is a short check of server-side resources used by Simple Reading Progress Bar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.1742.03 ▲11.01
Dashboard /wp-admin3.11 ▲0.0558.69 ▲7.31
Posts /wp-admin/edit.php3.16 ▲0.0553.44 ▼3.36
Add New Post /wp-admin/post-new.php5.47 ▲0.03102.81 ▼580.14
Media Library /wp-admin/upload.php3.05 ▲0.0539.40 ▼5.02

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Simple Reading Progress Bar
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,863 ▲29116.52 ▲0.5215.43 ▲3.0551.47 ▲3.24
Dashboard /wp-admin2,986 ▲526.79 ▲0.86158.03 ▼29.50119.31 ▼1.96
Posts /wp-admin/edit.php2,772 ▲333.03 ▲0.3189.99 ▲15.69100.97 ▲11.41
Add New Post /wp-admin/post-new.php1,706 ▲12518.58 ▲1.02443.65 ▼47.57112.87 ▼20.60
Media Library /wp-admin/upload.php1,840 ▲335.42 ▲0.40146.29 ▼29.47130.80 ▼6.06

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/simple-reading-progress-bar/simple-reading-progress-bar.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: readability, reading, progress bar

simple-reading-progress-bar/simple-reading-progress-bar.php Passed 13 tests

"Simple Reading Progress Bar" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
66 characters long description:
A simple and easy to custom progress bar at the top of your posts.

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
There were no executable files found in this plugin249 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP542167218
JavaScript24219
CSS12010
Markdown1002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity5.33
▷ Minimum class complexity2.00
▷ Maximum class complexity7.00
Average method complexity1.72
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods18
▷ Static methods15.56%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin