10% today-in-history

Code Review | Today In History

WordPress plugin Today In History scored10%from 54 tests.

About plugin

  • Plugin page: today-in-history
  • Plugin version: 0.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4.1
  • WordPress version: 6.3.1
  • First release: Feb 1, 2012
  • Latest release: Nov 3, 2012
  • Number of updates: 23
  • Update frequency: every 23.7 days
  • Top authors: bdoga (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,080 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
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/today-in-history/today_in_history.php+39
    Methods with the same name as their class will not be constructors in a future version of PHP; TIH_Widget has a deprecated constructor

Server metrics [RAM: ▼1.71MB] [CPU: ▼54.16ms] Passed 4 tests

Server-side resources used by Today In History
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.189.13 ▼37.99
Dashboard /wp-admin2.29 ▼1.0111.49 ▼42.56
Posts /wp-admin/edit.php2.29 ▼1.0611.26 ▼41.83
Add New Post /wp-admin/post-new.php2.29 ▼3.5911.50 ▼94.26
Media Library /wp-admin/upload.php2.29 ▼0.9410.99 ▼26.41

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_tih-widget
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Today In History
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.501.66 ▼0.2840.15 ▼4.20
Dashboard /wp-admin2,195 ▲185.67 ▲0.0990.44 ▼10.2243.56 ▼1.14
Posts /wp-admin/edit.php2,097 ▼32.01 ▲0.0340.12 ▲1.1837.09 ▼0.49
Add New Post /wp-admin/post-new.php1,526 ▼223.61 ▲0.62688.94 ▼30.8865.82 ▲3.96
Media Library /wp-admin/upload.php1,403 ▲34.21 ▲0.04103.08 ▼10.1742.75 ▼4.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in TIH_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_tih-widget
    • theysaidso_admin_options
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/today-in-history/today_in_history.php:39

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 21 tag instead of maximum 10
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Admin Interface), #2 (Example Widget Output)
The official readme.txt might help

today-in-history/today_in_history.php 92% from 13 tests

This is the main PHP file of "Today In History" version 0.5.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("today-in-history.php" instead of "today_in_history.php")

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
Everything looks great! No dangerous files found in this plugin204 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15839204

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.34
Average class complexity37.00
▷ Minimum class complexity37.00
▷ Maximum class complexity37.00
Average method complexity10.00
▷ Minimum method complexity1.00
▷ Maximum method complexity23.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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin