10% age-shortcode

Code Review | Age Shortcode

WordPress plugin Age Shortcode scored10%from 54 tests.

About plugin

  • Plugin page: age-shortcode
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.9.4
  • WordPress version: 6.3.1
  • First release: Jul 12, 2013
  • Latest release: Mar 24, 2018
  • Number of updates: 48
  • Update frequency: every 35.8 days
  • Top authors: tschinkes (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /2,083 total downloads


Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/age-shortcode/age_short.php+45
    Methods with the same name as their class will not be constructors in a future version of PHP; BirthdayShort has a deprecated constructor

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

Analyzing server-side resources used by Age Shortcode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.404.29 ▼34.16
Dashboard /wp-admin2.09 ▼1.266.33 ▼51.83
Posts /wp-admin/edit.php2.09 ▼1.275.94 ▼41.52
Add New Post /wp-admin/post-new.php2.09 ▼3.818.24 ▼85.60
Media Library /wp-admin/upload.php2.09 ▼1.155.46 ▼30.26

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Age Shortcode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.42 ▲0.061.67 ▲0.0540.33 ▼2.04
Dashboard /wp-admin2,195 ▲155.59 ▼0.0884.93 ▼5.6838.22 ▼5.77
Posts /wp-admin/edit.php2,100 ▼02.13 ▲0.1533.91 ▼0.9834.36 ▼4.49
Add New Post /wp-admin/post-new.php1,526 ▼023.10 ▲0.10695.33 ▼14.3161.21 ▼6.85
Media Library /wp-admin/upload.php1,400 ▼34.24 ▼0.10120.16 ▲19.9248.57 ▲3.81

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/age-shortcode/age_short.php+45
    Methods with the same name as their class will not be constructors in a future version of PHP; BirthdayShort has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • 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 no errors were found, this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: shortcode, birthday, age, user, author

age-shortcode/age_short.php 85% from 13 tests

The main file in "Age Shortcode" v. 1.2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("age-shortcode.php" instead of "age_short.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 163 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected105 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PO File36669

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected