89% reading-time-wp

Code Review | Reading Time WP

WordPress plugin Reading Time WP scored89%from 54 tests.

About plugin

  • Plugin page: reading-time-wp
  • Plugin version: 2.0.15
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Nov 15, 2014
  • Latest release: Oct 10, 2023
  • Number of updates: 68
  • Update frequency: every 47.8 days
  • Top authors: yingling017 (76.47%)yingles (25%)

Code review

54 tests

User reviews

18 reviews

Install metrics

20,000+ active /280,268 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Reading Time WP
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0538.84 ▼9.46
Dashboard /wp-admin3.35 ▲0.0047.22 ▼19.14
Posts /wp-admin/edit.php3.41 ▲0.0450.19 ▼3.33
Add New Post /wp-admin/post-new.php5.94 ▲0.04101.23 ▲6.43
Media Library /wp-admin/upload.php3.28 ▲0.0433.63 ▼1.21
Reading Time WP /wp-admin/options-general.php?page=rt-reading-time-settings3.3033.68

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
rt_reading_time_options

Browser metrics Passed 4 tests

An overview of browser requirements for Reading Time WP
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4114.28 ▼0.282.27 ▲0.4150.37 ▲4.80
Dashboard /wp-admin2,199 ▲195.63 ▲0.0487.00 ▼6.9339.40 ▼0.09
Posts /wp-admin/edit.php2,104 ▲12.01 ▼0.0838.72 ▼3.8235.38 ▼2.70
Add New Post /wp-admin/post-new.php1,530 ▼723.22 ▲5.08634.65 ▲12.9150.30 ▼10.40
Media Library /wp-admin/upload.php1,407 ▲74.22 ▲0.02100.15 ▼0.1644.40 ▼0.71
Reading Time WP /wp-admin/options-general.php?page=rt-reading-time-settings9061.9923.5231.15

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • rt_reading_time_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (An example of an estimated reading time entered before "the_content".), #2 (The options available in Reading Time WP.)
The official readme.txt is a good inspiration

reading-time-wp/rt-reading-time.php 92% from 13 tests

The main PHP script in "Reading Time WP" version 2.0.15 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("reading-time-wp.php" instead of "rt-reading-time.php")

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
Everything looks great! No dangerous files found in this plugin369 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP286157273
PO File1303196

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin