10% todays-date

Code Review | Today's Date

WordPress plugin Today's Date scored10%from 54 tests.

About plugin

  • Plugin page: todays-date
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-3.6
  • WordPress version: 6.3.1
  • First release: Aug 23, 2013
  • Latest release: Aug 27, 2013
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: ben poland (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /5,203 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
The following installer errors require your attention
  • The plugin did not install without errors
    • > User notice in wp-includes/functions.php+5905
    Function add_shortcode was called incorrectly. Invalid shortcode name: date today. Do not use spaces or reserved characters: & / < > [ ] = Please see Debugging in WordPress for more information. (This message was added in version 4.4.0.)

Server metrics [RAM: ▼1.94MB] [CPU: ▼54.88ms] Passed 4 tests

Analyzing server-side resources used by Today's Date
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.04 ▼1.424.49 ▼35.73
Dashboard /wp-admin2.06 ▼1.245.17 ▼46.52
Posts /wp-admin/edit.php2.06 ▼1.296.40 ▼43.92
Add New Post /wp-admin/post-new.php2.06 ▼3.826.67 ▼93.33
Media Library /wp-admin/upload.php2.06 ▼1.176.61 ▼31.46

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Today's Date
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.23 ▼1.141.81 ▼0.1542.11 ▼4.97
Dashboard /wp-admin2,218 ▲155.83 ▲0.77108.39 ▼10.7938.89 ▼4.29
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0040.69 ▲3.2437.04 ▲2.46
Add New Post /wp-admin/post-new.php1,545 ▼023.32 ▼0.01684.14 ▲68.9766.42 ▲15.54
Media Library /wp-admin/upload.php1,403 ▲64.17 ▲0.00111.88 ▲15.3847.86 ▲1.74

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function add_shortcode was called incorrectly. Invalid shortcode name: date today. Do not use spaces or reserved characters: & / < > [ ] = Please see Debugging in WordPress for more information. (This message was added in version 4.4.0.)
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/todays-date/display_date.php:16

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)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: date, current, current date, date today, todays date...

todays-date/display_date.php 92% from 13 tests

The principal PHP file in "Today's Date" v. 1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("todays-date.php" instead of "display_date.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected7 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1287

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
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

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin