10% post-reading-progress

Code Review | Post Reading Progress

WordPress plugin Post Reading Progress scored10%from 54 tests.

About plugin

  • Plugin page: post-reading-prog...
  • Plugin version: 1.1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9.4
  • WordPress version: 6.3.1
  • First release: Feb 21, 2018
  • Latest release: Mar 17, 2018
  • Number of updates: 16
  • Update frequency: every 1.5 days
  • Top authors: pietrek (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,404 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/post-reading-progress/includes/ReadingProgress.php+39
    Undefined index: options

Server metrics [RAM: ▼1.81MB] [CPU: ▼52.88ms] Passed 4 tests

This is a short check of server-side resources used by Post Reading Progress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.19 ▼1.286.69 ▼34.31
Dashboard /wp-admin2.21 ▼1.148.82 ▼54.74
Posts /wp-admin/edit.php2.21 ▼1.158.95 ▼35.92
Add New Post /wp-admin/post-new.php2.21 ▼3.689.49 ▼86.54
Media Library /wp-admin/upload.php2.21 ▼1.026.99 ▼30.14

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 14 new options
New WordPress options
wordpress-reading-bar-foreground
wordpress-reading-bar-position
wordpress-reading-bar-background
widget_recent-posts
can_compress_scripts
wordpress-reading-bar-enable-plugin
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
wordpress-reading-bar-autohide
...

Browser metrics Passed 4 tests

Post Reading Progress: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6313.25 ▼1.112.01 ▲0.3043.70 ▲1.87
Dashboard /wp-admin2,206 ▲215.90 ▲1.03113.00 ▼7.3643.78 ▼2.32
Posts /wp-admin/edit.php2,089 ▲31.99 ▼0.0334.23 ▼2.2132.28 ▲1.09
Add New Post /wp-admin/post-new.php1,519 ▲523.55 ▲6.11676.33 ▼8.5063.25 ▲1.85
Media Library /wp-admin/upload.php1,391 ▲34.26 ▲0.0393.53 ▼13.7141.78 ▼7.89

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/post-reading-progress/includes/ReadingProgress.php+39
    Undefined index: options
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: reading, progressbar, animated, progress, scroll...

post-reading-progress/post-reading-progress.php Passed 13 tests

The main PHP script in "Post Reading Progress" version 1.1.2 is automatically included on every request by WordPress
57 characters long description:
Add reading progress bar on top or bottom of single post.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin834 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP13150179788
PO File1111341
CSS2002
JavaScript2002
JSON1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity12.29
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes228.57%
Methods48
▷ Static methods510.42%
▷ Public methods4491.67%
▷ Protected methods00.00%
▷ Private methods48.33%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin