79% default-post-datetime

Code Review | Default Post Date and Time

WordPress plugin Default Post Date and Time scored 79% from 54 tests.

About plugin

  • Plugin page: default-post-date...
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.2
  • WordPress version: 6.3.1
  • First release: Oct 3, 2014
  • Latest release: Apr 17, 2023
  • Number of updates: 41
  • Update frequency: every 76.1 days
  • Top authors: GregRoss (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 2,264 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.67MB] [CPU: ▼19.57ms] Passed 4 tests

Analyzing server-side resources used by Default Post Date and Time
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.28 ▼3.27
Dashboard /wp-admin3.34 ▲0.0345.54 ▼4.84
Posts /wp-admin/edit.php3.39 ▲0.0349.13 ▼1.38
Add New Post /wp-admin/post-new.php3.11 ▼2.7828.69 ▼68.61
Media Library /wp-admin/upload.php3.26 ▲0.0335.38 ▼1.55

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Default Post Date and Time
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4714.48 ▲0.041.66 ▼0.7439.88 ▼9.74
Dashboard /wp-admin2,210 ▲224.84 ▼0.05106.40 ▼6.6941.37 ▼7.59
Posts /wp-admin/edit.php2,096 ▲72.01 ▼0.0239.26 ▲0.7633.52 ▲0.13
Add New Post /wp-admin/post-new.php1,525 ▼423.23 ▲5.18607.52 ▼21.0251.37 ▼13.55
Media Library /wp-admin/upload.php1,383 ▼54.16 ▼0.0894.64 ▼2.0141.83 ▼3.38
Default Post Date and Time /wp-admin/default-post-datetime.php260.440.1215.16

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 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 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/default-post-datetime/default-post-datetime.php:155

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/default-post-datetime.php
    • > Network (severe)
    wp-admin/default-post-datetime.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: admin

default-post-datetime/default-post-datetime.php Passed 13 tests

"Default Post Date and Time" version 1.3.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
57 characters long description:
Set the default date and time when you create a new post.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected413 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP25953223
JavaScript13345190

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ 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
There are no PNG files in this plugin