84% wp-date-and-time-shortcode

Code Review | WP Date and Time Shortcode

WordPress plugin WP Date and Time Shortcode scored 84% from 54 tests.

About plugin

  • Plugin page: wp-date-and-time-...
  • Plugin version: 2.5.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 5.8.1
  • First release: Sep 17, 2019
  • Latest release: Jul 27, 2021
  • Number of updates: 37
  • Update frequency: every 18.4 days
  • Top authors: denra (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

7,000+ active / 28,011 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.26MB] [CPU: ▼138.19ms] Passed 4 tests

A check of server-side resources used by WP Date and Time Shortcode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.08 ▲0.2450.39 ▲17.65
Dashboard /wp-admin3.38 ▲0.3252.08 ▲7.93
Posts /wp-admin/edit.php3.42 ▲0.3246.60 ▲1.40
Add New Post /wp-admin/post-new.php5.66 ▲0.2392.92 ▼564.87
Media Library /wp-admin/upload.php3.26 ▲0.2534.83 ▲2.77
Home /wp-admin/admin.php?page=denra-plugins3.2230.48
WP Date and Time Shortcode /wp-admin/admin.php?page=denra-plugin-wp-date-and-time-shortcode3.2231.18

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for WP Date and Time Shortcode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,810 ▲21415.81 ▼0.1412.02 ▲3.3954.93 ▲3.21
Dashboard /wp-admin3,098 ▲1645.93 ▼0.04151.21 ▲0.99118.35 ▲8.44
Posts /wp-admin/edit.php2,870 ▲1312.70 ▲0.0168.64 ▼1.1387.41 ▼4.80
Add New Post /wp-admin/post-new.php1,700 ▼17218.88 ▼0.44364.12 ▼0.21102.74 ▼11.52
Media Library /wp-admin/upload.php1,938 ▲1285.03 ▼0.01140.99 ▼7.25118.35 ▲1.75
Home /wp-admin/admin.php?page=denra-plugins1,1722.2261.9580.45
WP Date and Time Shortcode /wp-admin/admin.php?page=denra-plugin-wp-date-and-time-shortcode1,1522.2255.9874.44

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/wp-date-and-time-shortcode/denra-plugins/classes/PluginHooks.php+54
    Trying to access array offset on value of type bool

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Denra\\Plugins\\PluginHooks' not found in wp-content/plugins/wp-date-and-time-shortcode/plugin/classes/WPDateAndTimeShortcodeHooks.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Denra\\Plugins\\Basic' not found in wp-content/plugins/wp-date-and-time-shortcode/denra-plugins/classes/BasicExtra.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Denra\\Plugins\\BasicExtra' not found in wp-content/plugins/wp-date-and-time-shortcode/denra-plugins/classes/Framework.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Denra\\Plugins\\Plugin' not found in wp-content/plugins/wp-date-and-time-shortcode/plugin/classes/WPDateAndTimeShortcode.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Denra\\Plugins\\BasicExtra' not found in wp-content/plugins/wp-date-and-time-shortcode/denra-plugins/classes/Plugin.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: There are too many tags (24 tag instead of maximum 10)
You can look at the official readme.txt

wp-date-and-time-shortcode/wp-date-and-time-shortcode.php 92% from 13 tests

The main PHP script in "WP Date and Time Shortcode" version 2.5.3 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin877 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PO File151128

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity20.25
▷ Minimum class complexity1.00
▷ Maximum class complexity97.00
Average method complexity5.67
▷ Minimum method complexity1.00
▷ Maximum method complexity96.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
▷ Static methods1133.33%
▷ Public methods33100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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