78% how-old-am-i

Code Review | How Old Am I

WordPress plugin How Old Am I scored78%from 54 tests.

About plugin

  • Plugin page: how-old-am-i
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.4
  • WordPress version: 6.3.1
  • First release: Nov 12, 2012
  • Latest release: Aug 9, 2015
  • Number of updates: 4
  • Update frequency: every 250.7 days
  • Top authors: StathisG (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /2,491 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by How Old Am I
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.70 ▼3.88
Dashboard /wp-admin3.31 ▲0.0155.08 ▲5.55
Posts /wp-admin/edit.php3.36 ▲0.0152.36 ▲2.43
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.77 ▼10.43
Media Library /wp-admin/upload.php3.23 ▲0.0131.71 ▼2.40

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for How Old Am I
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.44 ▲0.091.63 ▼0.1639.81 ▼2.72
Dashboard /wp-admin2,199 ▲195.55 ▼0.1193.79 ▲2.3240.25 ▼1.60
Posts /wp-admin/edit.php2,101 ▲42.01 ▼0.0039.16 ▲2.6136.06 ▲2.19
Add New Post /wp-admin/post-new.php1,529 ▲123.06 ▲0.12609.97 ▼91.2258.36 ▲3.01
Media Library /wp-admin/upload.php1,404 ▲44.24 ▲0.0798.54 ▼4.5045.55 ▲0.56
How Old Am I /wp-admin/how-old-am-i.php260.420.0813.65

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/how-old-am-i/how-old-am-i.php:389

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/how-old-am-i.php
    • > Network (severe)
    wp-admin/how-old-am-i.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The plugin's settings), #2 (Example using default settings), #3 (Example using custom format with age in numbers), #4 (Example using Custom format with age in full), #5 (Example using shortcode attributes)
You can look at the official readme.txt

how-old-am-i/how-old-am-i.php Passed 13 tests

The main PHP file in "How Old Am I" ver. 1.2.0 adds more information about the plugin and also serves as the entry point for this plugin
52 characters long description:
Calculates and displays your age in several formats.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin449 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24624449

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity49.00
▷ Minimum class complexity49.00
▷ Maximum class complexity49.00
Average method complexity17.00
▷ Minimum method complexity3.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods266.67%
▷ Protected methods00.00%
▷ Private methods133.33%
Functions3
▷ Named functions3100.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
No PNG images were found in this plugin