90% post-reading-times

Code Review | Post reading times

WordPress plugin Post reading times scored90%from 54 tests.

About plugin

  • Plugin page: post-reading-times
  • Plugin version: 2.4.2
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2
  • WordPress version: 6.3.1
  • First release: Mar 9, 2022
  • Latest release: Apr 3, 2023
  • Number of updates: 16
  • Update frequency: every 24.4 days
  • Top authors: dmitrylitvinov (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

800+ active /2,085 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.73ms] Passed 4 tests

Server-side resources used by Post reading times
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.42 ▼3.76
Dashboard /wp-admin3.36 ▲0.0250.14 ▼16.60
Posts /wp-admin/edit.php3.41 ▲0.0649.66 ▲1.43
Add New Post /wp-admin/post-new.php5.94 ▲0.0689.09 ▼5.17
Media Library /wp-admin/upload.php3.28 ▲0.0635.16 ▼1.40
Post reading times settings /wp-admin/options-general.php?page=prt-plugin-options3.2534.33

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Post reading times
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.22 ▼1.362.05 ▲0.3840.92 ▼3.20
Dashboard /wp-admin2,210 ▲225.84 ▼0.01101.20 ▼11.0440.99 ▼1.35
Posts /wp-admin/edit.php2,093 ▲42.03 ▲0.0240.16 ▲1.9739.02 ▲4.33
Add New Post /wp-admin/post-new.php1,517 ▼1617.86 ▼5.27677.94 ▼16.7954.42 ▼8.77
Media Library /wp-admin/upload.php1,386 ▼24.21 ▲0.0399.52 ▲1.3044.11 ▲0.45
Post reading times settings /wp-admin/options-general.php?page=prt-plugin-options9002.0223.9631.05

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 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
1 plugin tags: reading time

post-reading-times/post-reading-times.php 92% from 13 tests

The entry point to "Post reading times" version 2.4.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 186 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin191 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP25829187
SVG1004

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods14100.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin