93% tldr-smart-reading-timer

Code Review | TL;DR - Smart Reading Timer

WordPress plugin TL;DR - Smart Reading Timer scored 93% from 54 tests.

About plugin

  • Plugin page: tldr-smart-readin...
  • Plugin version: 0.0.2
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Jun 19, 2015
  • Latest release: Aug 17, 2018
  • Number of updates: 10
  • Update frequency: every 115.6 days
  • Top authors: kinging (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 536 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

An overview of server-side resources used by TL;DR - Smart Reading Timer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1340.80 ▲18.85
Dashboard /wp-admin3.07 ▲0.0249.99 ▼0.96
Posts /wp-admin/edit.php3.13 ▲0.0246.06 ▼1.29
Add New Post /wp-admin/post-new.php5.44 ▲0.0198.84 ▼589.57
Media Library /wp-admin/upload.php3.02 ▲0.0135.46 ▼7.93

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for TL;DR - Smart Reading Timer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,723 ▲12716.02 ▲0.189.66 ▲0.2049.85 ▼6.71
Dashboard /wp-admin2,990 ▲565.89 ▼0.19148.92 ▼2.88114.45 ▼10.84
Posts /wp-admin/edit.php2,759 ▲202.69 ▼0.0072.28 ▲4.35101.85 ▲0.96
Add New Post /wp-admin/post-new.php1,683 ▼019.18 ▲0.72389.67 ▼9.46119.37 ▼1.35
Media Library /wp-admin/upload.php1,827 ▲205.02 ▲0.01159.61 ▼5.27128.24 ▼4.80

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/tldr-smart-reading-timer/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tldr-smart-reading-timer/dashboard.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/tldr-smart-reading-timer/filters.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/tldr-smart-reading-timer/TLDR.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Requires at least: Invalid version format
You can look at the official readme.txt

tldr-smart-reading-timer/TLDR.php 85% from 13 tests

Analyzing the main PHP file in "TL;DR - Smart Reading Timer" version 0.0.2
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("tldr-smart-reading-timer.php" instead of "TLDR.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected153 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP55423151
Markdown1002

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods5100.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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
No PNG images were found in this plugin