73% wp-date-and-time-shortcode

Code Review | WP Date and Time Shortcode

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

About plugin

  • Plugin page: wp-date-and-time-...
  • Plugin version: 2.6.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 17, 2019
  • Latest release: Aug 18, 2023
  • Number of updates: 54
  • Update frequency: every 26.5 days
  • Top authors: denra (100%)

Code review

54 tests

User reviews

26 reviews

Install metrics

10,000+ active /68,456 total downloads

Benchmarks

Plugin footprint 65% 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.25MB] [CPU: ▲2.36ms] 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.73 ▲0.2645.46 ▲5.31
Dashboard /wp-admin3.57 ▲0.2263.38 ▲0.57
Posts /wp-admin/edit.php3.68 ▲0.3254.42 ▲9.46
Add New Post /wp-admin/post-new.php6.14 ▲0.25103.40 ▲5.61
Media Library /wp-admin/upload.php3.49 ▲0.2646.96 ▼2.05
Home /wp-admin/admin.php?page=denra-plugins3.4641.98
WP Date and Time Shortcode /wp-admin/admin.php?page=denra-plugin-wp-date-and-time-shortcode3.4643.04

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WP Date and Time Shortcode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲16714.44 ▲0.092.03 ▲0.3746.81 ▲3.85
Dashboard /wp-admin2,316 ▲1365.71 ▲0.07106.87 ▲9.5944.04 ▲1.06
Posts /wp-admin/edit.php2,224 ▲1242.01 ▼0.0041.23 ▲0.0735.31 ▼21.96
Add New Post /wp-admin/post-new.php1,550 ▲18123.44 ▲7.01710.23 ▼277.7451.41 ▼29.98
Media Library /wp-admin/upload.php1,527 ▲1274.32 ▲0.15118.11 ▼24.8648.91 ▼11.88
Home /wp-admin/admin.php?page=denra-plugins9322.0025.3034.24
WP Date and Time Shortcode /wp-admin/admin.php?page=denra-plugin-wp-date-and-time-shortcode9242.0030.6030.76

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

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\\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\\BasicExtra' not found in wp-content/plugins/wp-date-and-time-shortcode/denra-plugins/classes/Plugin.php:17
    • > 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\\Plugin' not found in wp-content/plugins/wp-date-and-time-shortcode/plugin/classes/WPDateAndTimeShortcode.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

Optimizations

Plugin configuration 90% 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 85% from 13 tests

The main PHP script in "WP Date and Time Shortcode" version 2.6.4 is automatically included on every request by WordPress
The following require your attention:
  • Domain Path: The domain path should use only dashes and lowercase characters ("plugin/i18n")
  • 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 97% from 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 plugin1,005 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP9258188841
PO File2283994
CSS115970

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
These items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 108)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity21.75
▷ Minimum class complexity1.00
▷ Maximum class complexity109.00
Average method complexity6.03
▷ Minimum method complexity1.00
▷ Maximum method complexity108.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods33
▷ Static methods1133.33%
▷ Public methods33100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ 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