10% post-read-time

Code Review | Post Read Time

WordPress plugin Post Read Time scored10%from 54 tests.

About plugin

  • Plugin page: post-read-time
  • Plugin version: 1.2.6
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.6
  • WordPress version: 6.3.1
  • First release: Jun 1, 2019
  • Latest release: Dec 11, 2020
  • Number of updates: 17
  • Update frequency: every 32.9 days
  • Top authors: popeating (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /2,085 total downloads

Benchmarks

Plugin footprint 40% 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
  • Install procedure had errors
    • > Notice in wp-content/plugins/post-read-time/post-read-time.php+56
    Undefined property: PRT_Admin::$plugin_version

Server metrics [RAM: ▼1.93MB] [CPU: ▼49.08ms] Passed 4 tests

This is a short check of server-side resources used by Post Read Time
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.405.50 ▼30.25
Dashboard /wp-admin2.08 ▼1.228.20 ▼39.41
Posts /wp-admin/edit.php2.08 ▼1.287.40 ▼38.44
Add New Post /wp-admin/post-new.php2.08 ▼3.816.73 ▼88.23
Media Library /wp-admin/upload.php2.08 ▼1.156.18 ▼27.96
Post Read Time /wp-admin/options-general.php?page=post-read-time2.086.46

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
post-read-time_options

Browser metrics Passed 4 tests

Post Read Time: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.53 ▼1.111.60 ▼0.0840.08 ▼1.41
Dashboard /wp-admin2,207 ▲195.83 ▲0.9299.36 ▼8.1043.21 ▼0.42
Posts /wp-admin/edit.php2,096 ▲72.05 ▲0.0539.92 ▲2.6434.05 ▼1.27
Add New Post /wp-admin/post-new.php1,540 ▲1922.83 ▼0.35618.40 ▼54.5360.52 ▲2.59
Media Library /wp-admin/upload.php1,395 ▲104.22 ▲0.0498.04 ▲2.3242.12 ▲1.03
Post Read Time /wp-admin/options-general.php?page=post-read-time1,0002.0625.4732.81

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/post-read-time/post-read-time.php+56
    Undefined property: PRT_Admin::$plugin_version
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • post-read-time_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=post-read-time
    • > Notice in wp-content/plugins/post-read-time/post-read-time.php+56
    Undefined property: PRT_Admin::$plugin_version

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

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
4 plugin tags: words per minute, post read time, time to read, reading time

post-read-time/post-read-time.php Passed 13 tests

The main PHP file in "Post Read Time" ver. 1.2.6 adds more information about the plugin and also serves as the entry point for this plugin
50 characters long description:
Calculate and add reading time in minute to posts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin441 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP699115312
PO File13334107
CSS12022

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity4.25
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.93
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods14
▷ Static methods214.29%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
There are no PNG files in this plugin