90% lp-estimated-reading-time

Code Review | LP Estimated Reading Time

WordPress plugin LP Estimated Reading Time scored90%from 54 tests.

About plugin

  • Plugin page: lp-estimated-read...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4
  • WordPress version: 6.3.1
  • First release: Feb 10, 2016
  • Latest release: Feb 11, 2016
  • Number of updates: 7
  • Update frequency: every 1.0 days
  • Top authors: layerpoint (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

80+ active /2,466 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
Install script ran successfully

Server metrics [RAM: ▼0.11MB] [CPU: ▼14.54ms] Passed 4 tests

Analyzing server-side resources used by LP Estimated Reading Time
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▼0.0140.62 ▼7.06
Dashboard /wp-admin3.33 ▲0.0348.76 ▼5.33
Posts /wp-admin/edit.php3.38 ▼0.4647.92 ▼18.57
Add New Post /wp-admin/post-new.php5.91 ▲0.0294.95 ▼22.05
Media Library /wp-admin/upload.php3.25 ▲0.0231.09 ▼10.48
Lp Reading Time /wp-admin/options-general.php?page=lp-ert-options3.2532.97

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for LP Estimated Reading Time
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲1114.34 ▲0.201.64 ▼0.2742.90 ▼8.54
Dashboard /wp-admin2,204 ▲305.57 ▼0.0487.89 ▼21.7346.94 ▲0.78
Posts /wp-admin/edit.php2,109 ▲51.98 ▼0.0436.95 ▼6.0733.29 ▼3.51
Add New Post /wp-admin/post-new.php1,536 ▲1023.09 ▲0.36625.23 ▼83.0954.81 ▼0.34
Media Library /wp-admin/upload.php1,403 ▲64.21 ▲0.01100.52 ▼24.9540.50 ▼14.07
Lp Reading Time /wp-admin/options-general.php?page=lp-ert-options9562.0022.0332.64

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: reading time, time to read, estimated reading time, time, estimated

lp-estimated-reading-time/lp-estimated-reading-time.php 92% from 13 tests

"LP Estimated Reading Time" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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 detected299 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP36951193
Sass311041
CSS27035
JavaScript13019
JSON10011

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity6.50
▷ Minimum class complexity2.00
▷ Maximum class complexity11.00
Average method complexity1.92
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.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