10% last-year-post-widget

Code Review | Last Year Post Widget

WordPress plugin Last Year Post Widget scored10%from 54 tests.

About plugin

  • Plugin page: last-year-post-wi...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-3.5.1
  • WordPress version: 6.3.1
  • First release: May 6, 2013
  • Latest release: May 14, 2013
  • Number of updates: 4
  • Update frequency: every 2.3 days
  • Top authors: thedonjenkins (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,027 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > User deprecated in wp-includes/functions.php+5453
    Function get_settings is deprecated since version 2.1.0! Use get_option() instead.

Server metrics [RAM: ▼1.91MB] [CPU: ▼51.16ms] Passed 4 tests

An overview of server-side resources used by Last Year Post Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.394.77 ▼30.77
Dashboard /wp-admin2.10 ▼1.215.18 ▼41.48
Posts /wp-admin/edit.php2.10 ▼1.264.62 ▼42.31
Add New Post /wp-admin/post-new.php2.10 ▼3.796.57 ▼90.07
Media Library /wp-admin/upload.php2.10 ▼1.135.89 ▼29.01

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Last Year Post Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.23 ▼0.151.67 ▼0.1341.20 ▲1.41
Dashboard /wp-admin2,198 ▲215.65 ▲0.0381.72 ▼3.9638.36 ▼0.33
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0534.24 ▲0.1733.73 ▼0.24
Add New Post /wp-admin/post-new.php1,527 ▲123.18 ▼0.47663.01 ▼13.3457.79 ▲6.57
Media Library /wp-admin/upload.php1,403 ▲64.22 ▲0.0196.92 ▼8.1844.83 ▼1.82

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5453
    Function get_settings is deprecated since version 2.1.0! Use get_option() instead.
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

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 everything seems fine, this is not 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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_settings() in wp-content/plugins/last-year-post-widget/last_year_widget.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: widget, archive

last-year-post-widget/last_year_widget.php 92% from 13 tests

The entry point to "Last Year Post Widget" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("last-year-post-widget.php" instead of "last_year_widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected117 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12724117

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.57
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%
Functions4
▷ Named functions4100.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