84% timespan

Code Review | TimeSpan

WordPress plugin TimeSpan scored84%from 54 tests.

About plugin

  • Plugin page: timespan
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Sep 30, 2014
  • Latest release: Apr 15, 2015
  • Number of updates: 28
  • Update frequency: every 7.1 days
  • Top authors: paperleaf (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

50+ active /2,642 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

An overview of server-side resources used by TimeSpan
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.94 ▼0.06
Dashboard /wp-admin3.33 ▼0.0247.78 ▼18.36
Posts /wp-admin/edit.php3.38 ▲0.0252.44 ▲2.18
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.64 ▼25.75
Media Library /wp-admin/upload.php3.25 ▲0.0236.91 ▲2.28
TimeSpan /wp-admin/options-general.php?page=ttr-identifier3.2233.52

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please try to fix the following items
  • You have illegally modified 1 file (4.00KB) outside of "wp-content/plugins/timespan/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for TimeSpan
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7313.30 ▼0.651.95 ▲0.2543.79 ▲2.32
Dashboard /wp-admin2,222 ▲195.90 ▲1.05109.00 ▲1.0241.67 ▲2.00
Posts /wp-admin/edit.php2,104 ▲42.00 ▼0.1440.21 ▲5.8835.33 ▼1.46
Add New Post /wp-admin/post-new.php1,552 ▲2123.06 ▼0.21681.58 ▲18.9552.11 ▲2.17
Media Library /wp-admin/upload.php1,407 ▲74.25 ▲0.04107.56 ▲2.4950.62 ▲6.54
TimeSpan /wp-admin/options-general.php?page=ttr-identifier9602.0625.2347.78

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

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
Everything seems fine, however 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
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/timespan/timespan.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/timespan/includes/ttr-options.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
Please take inspiration from this readme.txt

timespan/timespan.php Passed 13 tests

The entry point to "TimeSpan" version 1.1.0 is a PHP file that has certain tags in its header comment area
103 characters long description:
A simple, easy to use plugin which can be used to display the average time it will take to read a post.

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
Success! There were no dangerous files found in this plugin197 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP25311197

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.32
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin