79% years-ago-today

Code Review | Years Ago Today

WordPress plugin Years Ago Today scored79%from 54 tests.

About plugin

  • Plugin page: years-ago-today
  • Plugin version: 1.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3
  • WordPress version: 6.3.1
  • First release: Jul 8, 2015
  • Latest release: Sep 3, 2023
  • Number of updates: 17
  • Update frequency: every 175.2 days
  • Top authors: coffee2code (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /4,494 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.22ms] Passed 4 tests

Server-side resources used by Years Ago Today
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0534.30 ▼6.80
Dashboard /wp-admin3.37 ▲0.0646.02 ▼1.21
Posts /wp-admin/edit.php3.48 ▲0.1245.74 ▼4.37
Add New Post /wp-admin/post-new.php5.95 ▲0.0689.80 ▼8.49
Media Library /wp-admin/upload.php3.29 ▲0.0535.42 ▲1.73

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Years Ago Today
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲10713.60 ▲0.401.64 ▼3.2639.94 ▼9.50
Dashboard /wp-admin2,245 ▲545.88 ▲0.9696.17 ▼8.7441.56 ▼2.68
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0438.86 ▲1.0535.32 ▲1.66
Add New Post /wp-admin/post-new.php1,536 ▲1623.33 ▲0.11592.90 ▼112.0851.00 ▼3.83
Media Library /wp-admin/upload.php1,379 ▼94.19 ▲0.0196.54 ▼3.0144.33 ▼1.57

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
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% 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 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/years-ago-today/tests/phpunit/bootstrap.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/years-ago-today/tests/phpunit/bootstrap.php on line 19
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/tests/phpunit/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/years-ago-today/tests/phpunit/bootstrap.php on line 19

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: history, coffee2code, on this day, dashboard, admin

years-ago-today/years-ago-today.php Passed 13 tests

This is the main PHP file of "Years Ago Today" version 1.5.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
116 characters long description:
Admin dashboard widget (and optional daily email) that lists posts published to your site on this day in years past.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected887 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP4222362646
Markdown4700206
Bourne Shell16221
XML10014

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity17.00
▷ Minimum class complexity6.00
▷ Maximum class complexity28.00
Average method complexity1.48
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods67
▷ Static methods2131.34%
▷ Public methods6597.01%
▷ Protected methods00.00%
▷ Private methods22.99%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected