89% date-calculator

Code Review | Date Calculator

WordPress plugin Date Calculator scored89%from 54 tests.

About plugin

  • Plugin page: date-calculator
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.0
  • WordPress version: 6.3.1
  • First release: Sep 10, 2014
  • Latest release: Feb 20, 2018
  • Number of updates: 28
  • Update frequency: every 45.0 days
  • Top authors: matthias.s (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

400+ active /4,899 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.86ms] Passed 4 tests

Server-side resources used by Date Calculator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.0545.16 ▲0.71
Dashboard /wp-admin3.62 ▼0.0149.64 ▼14.38
Posts /wp-admin/edit.php3.73 ▲0.0553.64 ▲3.09
Add New Post /wp-admin/post-new.php6.20 ▲0.05109.21 ▲10.88
Media Library /wp-admin/upload.php3.54 ▲0.0538.79 ▼0.84
Date Calculator /wp-admin/options-general.php?page=dc-options3.5136.31

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Date Calculator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.29 ▲0.051.74 ▲0.0444.67 ▲0.49
Dashboard /wp-admin2,202 ▲255.65 ▼0.1683.39 ▼12.6244.03 ▲5.46
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0141.46 ▲4.4238.56 ▲3.09
Add New Post /wp-admin/post-new.php1,539 ▼623.26 ▲0.08658.79 ▼27.3955.18 ▲1.13
Media Library /wp-admin/upload.php1,407 ▲134.17 ▼0.0898.19 ▼4.6444.54 ▼1.06
Date Calculator /wp-admin/options-general.php?page=dc-options1,1292.0227.7541.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
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 a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
Please take inspiration from this readme.txt

date-calculator/date-calculator.php 92% from 13 tests

Analyzing the main PHP file in "Date Calculator" version 1.2.0
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 146 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected222 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15431222

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions6
▷ Named functions6100.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 files were detected