77% reading-time

Code Review | Reading Time

WordPress plugin Reading Time scored77%from 54 tests.

About plugin

  • Plugin page: reading-time
  • Plugin version: 1.2.20
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 2, 2011
  • Latest release: Nov 5, 2023
  • Number of updates: 49
  • Update frequency: every 95.8 days
  • Top authors: whiletrue (69.39%)formikaio (32.65%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /11,618 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.80ms] Passed 4 tests

A check of server-side resources used by Reading Time
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.93 ▲1.41
Dashboard /wp-admin3.34 ▲0.0344.27 ▼6.29
Posts /wp-admin/edit.php3.39 ▲0.0344.92 ▼4.78
Add New Post /wp-admin/post-new.php5.92 ▲0.0391.02 ▲2.90
Media Library /wp-admin/upload.php3.26 ▲0.0334.22 ▲2.47
Reading Time /wp-admin/options-general.php?page=reading_time_options3.2132.69

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

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

Browser metrics Passed 4 tests

Reading Time: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲714.67 ▲0.811.57 ▼0.2337.20 ▼1.31
Dashboard /wp-admin2,202 ▲255.58 ▼0.0785.60 ▼8.6338.72 ▼2.83
Posts /wp-admin/edit.php2,083 ▼171.99 ▲0.0536.58 ▼5.6635.17 ▼2.84
Add New Post /wp-admin/post-new.php1,534 ▲823.10 ▼0.68652.49 ▼31.0952.44 ▼1.78
Media Library /wp-admin/upload.php1,407 ▲74.17 ▼0.0998.72 ▼2.4841.65 ▼6.01
Reading Time /wp-admin/options-general.php?page=reading_time_options9671.9925.8831.17

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • reading_time
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/reading-time/uninstall.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/reading-time/reading_time.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Requires at least: Version format is invalid
  • Screenshots: Screenshot #1 (Sample content with the progress bar almost filled) image not found
The official readme.txt might help

reading-time/reading_time.php 85% from 13 tests

Analyzing the main PHP file in "Reading Time" version 1.2.20
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("reading-time.php" instead of "reading_time.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 171 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected177 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP34731177

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png1.53KB0.45KB▼ 70.46%