83% years-since

Code Review | Years Since

WordPress plugin Years Since scored83%from 54 tests.

About plugin

  • Plugin page: years-since
  • Plugin version: 1.3.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Apr 9, 2018
  • Latest release: Oct 7, 2023
  • Number of updates: 38
  • Update frequency: every 52.8 days
  • Top authors: laurencebahiirwa (60.53%)johnalarcon (42.11%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /2,968 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.40ms] Passed 4 tests

Server-side resources used by Years Since
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0335.76 ▼2.46
Dashboard /wp-admin3.34 ▲0.0340.34 ▼11.31
Posts /wp-admin/edit.php3.39 ▲0.0347.79 ▲5.02
Add New Post /wp-admin/post-new.php5.92 ▲0.0376.16 ▼16.86
Media Library /wp-admin/upload.php3.26 ▲0.0337.28 ▲6.17

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Years Since
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.25 ▼1.151.61 ▼0.2937.89 ▼6.97
Dashboard /wp-admin2,206 ▲185.86 ▲0.99110.32 ▼6.6742.24 ▼2.54
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0339.55 ▼1.9234.75 ▼0.84
Add New Post /wp-admin/post-new.php1,533 ▼023.22 ▼0.15659.99 ▲43.4257.34 ▲4.29
Media Library /wp-admin/upload.php1,391 ▲64.20 ▲0.0096.63 ▲0.4741.90 ▼1.28

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/years-since/alar-years-since.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: No descriptions were found for these screenshots #1, #2 in years-since/assets to your readme.txt
Please take inspiration from this readme.txt

years-since/alar-years-since.php 85% from 13 tests

The main PHP script in "Years Since" version 1.3.5 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("years-since.php" instead of "alar-years-since.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 179 characters long)

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
Good job! No executable or dangerous file extensions detected92 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1235492

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.82
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity6.20
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected