78% article-read-time-lite

Code Review | Article Read Time - WordPress plugin for displaying total reading time and progress bar

WordPress plugin Article Read Time - WordPress plugin for displaying total reading time and progress bar scored 78% from 54 tests.

About plugin

  • Plugin page: article-read-time...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.1
  • WordPress version: 6.3.1
  • First release: Mar 19, 2022
  • Latest release: Jan 11, 2023
  • Number of updates: 5
  • Update frequency: every 59.8 days
  • Top authors: wpshuffle (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 570 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.25MB] [CPU: ▼17.47ms] Passed 4 tests

Analyzing server-side resources used by Article Read Time - WordPress plugin for displaying total reading time and progress bar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0338.73 ▼8.35
Dashboard /wp-admin3.39 ▲0.0847.51 ▲0.07
Posts /wp-admin/edit.php3.44 ▲0.0849.65 ▲3.71
Add New Post /wp-admin/post-new.php4.68 ▼1.2143.41 ▼61.57
Media Library /wp-admin/upload.php3.31 ▲0.0836.59 ▼0.02
Progress Bar /wp-admin/admin.php?page=artl-progress-bar3.3033.45
Article Read Time Lite Settings /wp-admin/admin.php?page=article-read-time-lite3.3435.19
About /wp-admin/admin.php?page=artl-about3.2831.71
Help /wp-admin/admin.php?page=artl-help3.2731.20

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 42 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Article Read Time - WordPress plugin for displaying total reading time and progress bar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲14913.60 ▼0.785.89 ▲3.4442.65 ▼2.05
Dashboard /wp-admin2,241 ▲535.79 ▼0.06102.82 ▼12.2239.62 ▼0.96
Posts /wp-admin/edit.php2,124 ▲352.01 ▼0.0441.56 ▲1.8936.51 ▲3.18
Add New Post /wp-admin/post-new.php1,561 ▲1923.22 ▲4.62649.91 ▼9.6452.53 ▼2.68
Media Library /wp-admin/upload.php1,420 ▲294.24 ▲0.0496.70 ▼6.6340.13 ▼2.66
Progress Bar /wp-admin/admin.php?page=artl-progress-bar1,2372.3063.6550.41
Article Read Time Lite Settings /wp-admin/admin.php?page=article-read-time-lite1,2191.9940.6543.76
About /wp-admin/admin.php?page=artl-about9251.9026.5729.13
Help /wp-admin/admin.php?page=artl-help8761.9028.2029.15

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=article-read-time-lite
    • > Notice in wp-content/plugins/article-read-time-lite/includes/views/boxes/layout-settings.php+177
    Trying to access array offset on value of type bool
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=article-read-time-lite
    • > Notice in wp-content/plugins/article-read-time-lite/includes/views/boxes/layout-settings.php+177
    Trying to access array offset on value of type null

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
Almost there! Just fix the following items
  • 14× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/article-read-time-lite/includes/views/backend/help.php
    • > /wp-content/plugins/article-read-time-lite/includes/views/frontend/posthtml.php
    • > /wp-content/plugins/article-read-time-lite/includes/cores/artl-block.php
    • > /wp-content/plugins/article-read-time-lite/article-read-time-lite.php
    • > /wp-content/plugins/article-read-time-lite/includes/views/backend/progress-bar-settings.php
    • > /wp-content/plugins/article-read-time-lite/includes/views/backend/settings.php
    • > /wp-content/plugins/article-read-time-lite/includes/cores/progress-bar-customize.php
    • > /wp-content/plugins/article-read-time-lite/includes/cores/artl-paragraph.php
    • > /wp-content/plugins/article-read-time-lite/includes/views/boxes/about.php
    • > /wp-content/plugins/article-read-time-lite/includes/views/boxes/basic-settings.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: read time, posts, time, reading time, characters count...

article-read-time-lite/article-read-time-lite.php 92% from 13 tests

This is the main PHP file of "Article Read Time - WordPress plugin for displaying total reading time and progress bar" version 1.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Requires PHP: Required version must be the same as the one declared in readme.txt ("5.2.4" instead of "5.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin1,854 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
CSS38621873
PHP1521434844
JavaScript24815106
SVG30031

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity48.00
▷ Minimum class complexity48.00
▷ Maximum class complexity48.00
Average method complexity4.13
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 0.76MB with 0.34MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/template-paragraph/template-1.png148.93KB78.84KB▼ 47.06%
images/template-block/template-2.png228.01KB124.09KB▼ 45.58%
images/template-paragraph/template-2.png150.31KB79.48KB▼ 47.12%
images/template-block/template-1.png226.22KB123.59KB▼ 45.37%
images/paragraphicon.png7.31KB4.43KB▼ 39.36%