90% shortcode-for-current-date

Code Review | Shortcode for Current Date

WordPress plugin Shortcode for Current Date scored90%from 54 tests.

About plugin

  • Plugin page: shortcode-for-cur...
  • Plugin version: 2.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: May 7, 2017
  • Latest release: Sep 13, 2023
  • Number of updates: 61
  • Update frequency: every 38.0 days
  • Top authors: imtiazrayhan (100%)

Code review

54 tests

User reviews

114 reviews

Install metrics

20,000+ active /196,394 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.21ms] Passed 4 tests

Analyzing server-side resources used by Shortcode for Current Date
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.99 ▼1.84
Dashboard /wp-admin3.36 ▲0.0547.20 ▼4.63
Posts /wp-admin/edit.php3.47 ▲0.1148.88 ▼2.76
Add New Post /wp-admin/post-new.php5.93 ▲0.05100.23 ▲2.88
Media Library /wp-admin/upload.php3.28 ▲0.0536.93 ▲0.38
Shortcode for Current Date /wp-admin/index.php?page=sfcd_welcome_menu_page3.2431.53
Shortcode for Current Date /wp-admin/options-general.php?page=sfcd_menu_page3.2633.11

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
sfcd_installDate
widget_theysaidso_widget
sfcd_review_notify
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Shortcode for Current Date
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.16 ▼1.141.83 ▼0.2042.48 ▼14.89
Dashboard /wp-admin2,210 ▲194.86 ▼0.0197.13 ▼18.9039.37 ▼9.60
Posts /wp-admin/edit.php2,093 ▲222.00 ▼0.0137.01 ▼1.7533.63 ▼4.80
Add New Post /wp-admin/post-new.php6,418 ▲4,88328.36 ▲4.97874.24 ▲195.1036.26 ▼14.90
Media Library /wp-admin/upload.php1,395 ▲74.13 ▼0.0599.34 ▼5.8342.13 ▼3.49
Shortcode for Current Date /wp-admin/index.php?page=sfcd_welcome_menu_page8302.0225.1651.86
Shortcode for Current Date /wp-admin/options-general.php?page=sfcd_menu_page1,6242.0223.7544.80

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • sfcd_review_notify
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

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
4 plugin tags: current date, year, shortcode, month

shortcode-for-current-date/shortcode-for-current-date.php 92% from 13 tests

"Shortcode for Current Date" version 2.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, 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 file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected741 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP614790554
CSS22099
JavaScript68588

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity4.00
▷ Minimum class complexity2.00
▷ Maximum class complexity6.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods17
▷ Static methods1588.24%
▷ Public methods17100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/icon-128x128.png4.86KB1.67KB▼ 65.74%