84% date-tool

Code Review | Date Tool

WordPress plugin Date Tool scored84%from 54 tests.

About plugin

  • Plugin page: date-tool
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.9.2
  • WordPress version: 6.3.1
  • First release: Jun 27, 2013
  • Latest release: Aug 10, 2014
  • Number of updates: 12
  • Update frequency: every 34.3 days
  • Top authors: gordi555 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /4,515 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼0.84ms] Passed 4 tests

This is a short check of server-side resources used by Date Tool
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0139.41 ▲2.78
Dashboard /wp-admin3.31 ▲0.0045.67 ▼4.96
Posts /wp-admin/edit.php3.36 ▲0.0046.48 ▲0.11
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.81 ▼1.07
Media Library /wp-admin/upload.php3.23 ▲0.0037.62 ▲2.57

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Date Tool
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.23 ▼1.141.70 ▲0.0338.23 ▼3.71
Dashboard /wp-admin2,203 ▲185.83 ▲0.0193.07 ▼14.5936.51 ▼6.60
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0032.73 ▼1.0534.25 ▼1.98
Add New Post /wp-admin/post-new.php1,546 ▲1323.44 ▲0.45638.15 ▼24.5151.28 ▲1.01
Media Library /wp-admin/upload.php1,391 ▲64.15 ▲0.01107.90 ▲5.9645.85 ▲2.21

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 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 50% 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
Please fix 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/date-tool/index.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
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
6 plugin tags: current day, current month, return date, date, current date...

date-tool/index.php 92% from 13 tests

The primary PHP file in "Date Tool" version 1.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("date-tool.php" instead of "index.php")

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
There were no executable files found in this plugin12 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP141212

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.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
No PNG images were found in this plugin