90% default-post-date

Code Review | Default Post Date

WordPress plugin Default Post Date scored 90% from 54 tests.

About plugin

  • Plugin page: default-post-date
  • Plugin version: 1.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.0-4.4
  • WordPress version: 6.3.1
  • First release: Mar 6, 2015
  • Latest release: Dec 15, 2015
  • Number of updates: 11
  • Update frequency: every 25.8 days
  • Top authors: ipm-frommen (63.64%)tfrommen (45.45%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,439 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: ▼1.01ms] Passed 4 tests

This is a short check of server-side resources used by Default Post Date
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.92 ▼3.19
Dashboard /wp-admin3.32 ▲0.0146.09 ▼4.49
Posts /wp-admin/edit.php3.37 ▲0.0148.75 ▲1.57
Add New Post /wp-admin/post-new.php5.90 ▲0.0195.37 ▲6.31
Media Library /wp-admin/upload.php3.24 ▲0.0136.31 ▲2.07

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
default_post_date_version
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Default Post Date: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲3613.19 ▼0.101.95 ▲0.2140.21 ▼2.81
Dashboard /wp-admin2,209 ▼05.90 ▼0.00107.08 ▼2.9441.17 ▼0.44
Posts /wp-admin/edit.php2,089 ▼32.05 ▲0.0139.25 ▲5.1235.04 ▲4.16
Add New Post /wp-admin/post-new.php1,535 ▲223.35 ▼0.02669.16 ▼0.0654.23 ▲1.05
Media Library /wp-admin/upload.php1,391 ▲34.19 ▼0.0796.02 ▼2.8551.65 ▲1.95

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: posts, publish, post, date, bulk

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

"Default Post Date" version 1.5.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
81 characters long description:
Define an individual default post date that is to be used when adding a new post.

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
Success! There were no dangerous files found in this plugin635 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP20214439598
JavaScript24121
PO File13616

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity4.86
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods49
▷ Static methods24.08%
▷ Public methods4693.88%
▷ Protected methods00.00%
▷ Private methods36.12%
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
There are no PNG files in this plugin