90% current-year-shortcodes

Code Review | Current Year Shortcodes

WordPress plugin Current Year Shortcodes scored90%from 54 tests.

About plugin

  • Plugin page: current-year-shor...
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Dec 20, 2022
  • Latest release: Jun 8, 2023
  • Number of updates: 5
  • Update frequency: every 34.0 days
  • Top authors: praxismarketing (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /814 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.39ms] Passed 4 tests

Server-side resources used by Current Year Shortcodes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.42 ▼4.81
Dashboard /wp-admin3.31 ▲0.0143.76 ▼9.35
Posts /wp-admin/edit.php3.36 ▲0.0145.21 ▲1.09
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.39 ▲0.58
Media Library /wp-admin/upload.php3.23 ▲0.0134.48 ▲0.03

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Current Year Shortcodes
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.24 ▼1.321.76 ▲0.0441.44 ▲1.01
Dashboard /wp-admin2,209 ▲184.88 ▲0.0198.51 ▼2.1039.64 ▼2.20
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0539.47 ▼1.0035.66 ▲0.65
Add New Post /wp-admin/post-new.php1,535 ▲1623.04 ▼0.10645.39 ▼34.0157.55 ▼1.35
Media Library /wp-admin/upload.php1,385 ▼64.29 ▼0.0499.70 ▼4.0142.48 ▼6.71

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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

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

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: time, date, year, current, month...

current-year-shortcodes/wp-year-shortcode.php 92% from 13 tests

The entry point to "Current Year Shortcodes" version 0.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("current-year-shortcodes.php" instead of "wp-year-shortcode.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin44 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2121244

PHP code Passed 2 tests

An overview 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.09
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%
Functions10
▷ Named functions10100.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