84% estimate-read-time

Code Review | Estimate Read Time

WordPress plugin Estimate Read Time scored84%from 54 tests.

About plugin

  • Plugin page: estimate-read-time
  • Plugin version: 1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2
  • WordPress version: 6.3.1
  • First release: Apr 5, 2022
  • Latest release: Mar 19, 2023
  • Number of updates: 6
  • Update frequency: every 58.0 days
  • Top authors: abigeater (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /220 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 gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.31ms] Passed 4 tests

Analyzing server-side resources used by Estimate Read Time
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.59 ▼8.71
Dashboard /wp-admin3.32 ▲0.0145.33 ▼2.10
Posts /wp-admin/edit.php3.37 ▲0.0147.77 ▼4.03
Add New Post /wp-admin/post-new.php5.90 ▲0.0198.16 ▼2.38
Media Library /wp-admin/upload.php3.24 ▲0.0138.54 ▲5.63
[AB] Settings /wp-admin/options-general.php?page=ab_read_time_setting3.2331.15

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Estimate Read Time
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.33 ▼0.986.01 ▲4.2042.07 ▲1.40
Dashboard /wp-admin2,207 ▲224.85 ▼1.0698.90 ▼15.2539.53 ▼3.10
Posts /wp-admin/edit.php2,090 ▲11.97 ▼0.0737.25 ▼4.0034.75 ▼3.62
Add New Post /wp-admin/post-new.php1,536 ▼723.49 ▲5.41605.88 ▼8.5856.60 ▼5.27
Media Library /wp-admin/upload.php1,392 ▲14.20 ▼0.0095.47 ▼2.7240.96 ▼2.74
[AB] Settings /wp-admin/options-general.php?page=ab_read_time_setting7982.0322.1228.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/estimate-read-time/public/hooks.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/estimate-read-time/estimate-read-time.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
There were not plugin tags detected

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

Analyzing the main PHP file in "Estimate Read Time" version 1.0
73 characters long description:
When save post, this plugin will estimate read time and save in post meta

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin207 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP33515194
Markdown211013

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods7100.00%
▷ Public methods457.14%
▷ Protected methods00.00%
▷ Private methods342.86%
Functions7
▷ Named functions114.29%
▷ Anonymous functions685.71%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin