84% too-long-didnt-read

Code Review | TL;DR

WordPress plugin TL;DR scored84%from 54 tests.

About plugin

  • Plugin page: too-long-didnt-read
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.4.1
  • WordPress version: 6.3.1
  • First release: Oct 20, 2010
  • Latest release: Jun 7, 2020
  • Number of updates: 5
  • Update frequency: every 703.6 days
  • Top authors: ozh (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /917 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▲1.76ms] Passed 4 tests

An overview of server-side resources used by TL;DR
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.36 ▼0.00
Dashboard /wp-admin3.31 ▲0.0154.19 ▲2.30
Posts /wp-admin/edit.php3.36 ▲0.0051.11 ▲5.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.26 ▼0.34
Media Library /wp-admin/upload.php3.23 ▲0.0039.76 ▲5.89

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

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

Browser metrics Passed 4 tests

Checking browser requirements for TL;DR
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.011.98 ▲0.2742.16 ▲1.80
Dashboard /wp-admin2,195 ▲185.59 ▲0.0289.90 ▲0.7045.87 ▲4.29
Posts /wp-admin/edit.php2,097 ▼32.03 ▲0.0534.84 ▼1.4437.77 ▼0.42
Add New Post /wp-admin/post-new.php1,528 ▲223.14 ▲0.22662.40 ▼4.3452.78 ▼0.09
Media Library /wp-admin/upload.php1,400 ▼04.29 ▲0.08112.77 ▲6.4847.63 ▼2.08

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/too-long-didnt-read/plugin.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: tldr, ozh, excerpt, reddit

too-long-didnt-read/plugin.php 92% from 13 tests

Analyzing the main PHP file in "TL;DR" version 1.0.2
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("too-long-didnt-read.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected26 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP131121
Markdown1505

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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 files were detected