78% user-age-calculator

Code Review | User Age Calculator

WordPress plugin User Age Calculator scored78%from 54 tests.

About plugin

  • Plugin page: user-age-calculator
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 17, 2021
  • Latest release: Dec 17, 2022
  • Number of updates: 11
  • Update frequency: every 35.9 days
  • Top authors: vikas4travel (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /1,876 total downloads

Benchmarks

Plugin footprint 83% 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.04MB] [CPU: ▼4.42ms] Passed 4 tests

This is a short check of server-side resources used by User Age Calculator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0440.34 ▼7.64
Dashboard /wp-admin3.36 ▲0.0153.29 ▼11.38
Posts /wp-admin/edit.php3.41 ▲0.0560.92 ▲3.26
Add New Post /wp-admin/post-new.php5.96 ▲0.0791.68 ▲0.09
Media Library /wp-admin/upload.php3.29 ▲0.0539.53 ▲1.26
User Age Calculator /wp-admin/options-general.php?page=user-age-calculator3.3639.80

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
uac_welcome
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for User Age Calculator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲7214.36 ▼0.221.85 ▲0.0040.88 ▲1.73
Dashboard /wp-admin2,224 ▲475.83 ▲0.1794.04 ▲3.6438.44 ▼5.45
Posts /wp-admin/edit.php2,131 ▲282.29 ▲0.2840.29 ▲0.2335.11 ▼2.03
Add New Post /wp-admin/post-new.php1,565 ▲3723.26 ▲0.13619.27 ▼69.9132.79 ▼29.89
Media Library /wp-admin/upload.php1,426 ▲264.44 ▲0.26100.28 ▼11.0343.15 ▼5.48
User Age Calculator /wp-admin/options-general.php?page=user-age-calculator4,8594.11118.8543.20

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • uac_welcome
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

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
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/user-age-calculator/user-age-calculator.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/user-age-calculator/templates/admin-panel.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/user-age-calculator/templates/user-age-calculator-template1.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/user-age-calculator/templates/user-age-calculator-template2.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: user age calculator, age calculator

user-age-calculator/user-age-calculator.php 92% from 13 tests

"User Age Calculator" version 1.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.9" instead of "5.2")

Code Analysis Passed 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
Success! There were no dangerous files found in this plugin1,095 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP517860628
JavaScript26442261
CSS2300172
Markdown118034

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity46.00
▷ Minimum class complexity46.00
▷ Maximum class complexity46.00
Average method complexity6.00
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
4 PNG files occupy 0.48MB with 0.34MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-4.png238.13KB50.53KB▼ 78.78%
assets/screenshot-1.png15.36KB5.76KB▼ 62.50%
assets/screenshot-3.png217.49KB45.64KB▼ 79.01%
assets/screenshot-2.png22.08KB8.22KB▼ 62.78%