10% a-year-ago-today

Code Review | A Year Ago Today

WordPress plugin A Year Ago Today scored 10% from 54 tests.

About plugin

  • Plugin page: a-year-ago-today
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 5.8.1
  • First release: Feb 19, 2013
  • Latest release: Feb 20, 2013
  • Number of updates: 7
  • Update frequency: every 0.3 days
  • Top authors: jerimiw (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,394 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/a-year-ago-today/year_ago.php+19
    Methods with the same name as their class will not be constructors in a future version of PHP; jaw_year_ago_my_info has a deprecated constructor

Server metrics [RAM: ▼1.85MB] [CPU: ▼186.87ms] Passed 4 tests

Analyzing server-side resources used by A Year Ago Today
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /1.79 ▼1.058.29 ▼14.33
Dashboard /wp-admin1.81 ▼1.264.65 ▼34.61
Posts /wp-admin/edit.php1.81 ▼1.313.80 ▼27.84
Add New Post /wp-admin/post-new.php1.81 ▼3.643.84 ▼663.28
Media Library /wp-admin/upload.php1.81 ▼1.203.45 ▼21.74

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 1 new option
New WordPress options
widget_jaw_year_ago_my_info

Browser metrics Passed 4 tests

An overview of browser requirements for A Year Ago Today
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,666 ▲4015.71 ▼0.345.54 ▲0.0677.14 ▲2.96
Dashboard /wp-admin2,930 ▲316.05 ▼0.12115.02 ▼20.29168.03 ▼4.22
Posts /wp-admin/edit.php2,743 ▲33.24 ▲0.0063.59 ▼0.92134.07 ▼4.70
Add New Post /wp-admin/post-new.php3,807 ▲7218.66 ▲0.63415.07 ▼18.36158.32 ▼13.85
Media Library /wp-admin/upload.php1,752 ▼05.49 ▼0.00148.82 ▲5.35183.15 ▲1.20

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/a-year-ago-today/year_ago.php+19
    Methods with the same name as their class will not be constructors in a future version of PHP; jaw_year_ago_my_info has a deprecated constructor
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_jaw_year_ago_my_info

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/a-year-ago-today/year_ago.php:13

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: widget, old posts, sidebar

a-year-ago-today/year_ago.php 92% from 13 tests

The principal PHP file in "A Year Ago Today" v. 1.0.2 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("a-year-ago-today.php" instead of "year_ago.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 detected63 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP19963

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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