10% time-ago-units

Code Review | Time Ago Units

WordPress plugin Time Ago Units scored10%from 54 tests.

About plugin

  • Plugin page: time-ago-units
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 6.3.1
  • First release: Dec 13, 2018
  • Latest release: May 31, 2021
  • Number of updates: 5
  • Update frequency: every 180.0 days
  • Top authors: jacklowrie (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /641 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • Install procedure had errors
    • > Warning in wp-content/plugins/time-ago-units/time-ago-units.php+37
    require_once(wp-content/plugins/time-ago-units/autoloader.php): failed to open stream: No such file or directory

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

Server-side resources used by Time Ago Units
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0033.71 ▼9.82
Dashboard /wp-admin3.31 ▲0.0044.37 ▼1.25
Posts /wp-admin/edit.php3.36 ▲0.0046.82 ▼2.65
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.69 ▼0.92
Media Library /wp-admin/upload.php3.23 ▲0.0033.56 ▼1.33

Server storage [IO: ▲0.03MB] [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: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Time Ago Units
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.22 ▼1.171.63 ▼0.0942.59 ▼6.54
Dashboard /wp-admin2,203 ▲155.83 ▲0.9699.82 ▼5.4938.46 ▼3.90
Posts /wp-admin/edit.php2,092 ▲32.06 ▲0.0540.54 ▲4.9535.02 ▼2.26
Add New Post /wp-admin/post-new.php1,519 ▲522.93 ▲5.36621.85 ▼80.9752.91 ▼7.19
Media Library /wp-admin/upload.php1,391 ▲34.19 ▲0.0495.56 ▼4.4642.19 ▼0.84

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/time-ago-units/autoloader.php' (include_path='.:/usr/share/php') in wp-content/plugins/time-ago-units/time-ago-units.php on line 37
    • > PHP Warning
      require_once(wp-content/plugins/time-ago-units/autoloader.php): failed to open stream: No such file or directory in wp-content/plugins/time-ago-units/time-ago-units.php on line 37

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
You can take inspiration from this readme.txt

time-ago-units/time-ago-units.php 92% from 13 tests

The principal PHP file in "Time Ago Units" v. 1.0.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.0.1" instead of "5.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected180 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP55146180

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity14.50
▷ Minimum class complexity6.00
▷ Maximum class complexity23.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
No PNG files were detected