94% post-date-time-change

Code Review | Post Date Time Change

WordPress plugin Post Date Time Change scored 94% from 54 tests.

About plugin

  • Plugin page: post-date-time-ch...
  • Plugin version: 5.08
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.5
  • WordPress version: 5.8.1
  • First release: Aug 11, 2014
  • Latest release: Dec 3, 2020
  • Number of updates: 120
  • Update frequency: every 19.2 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

6,000+ active / 79,700 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼136.64ms] Passed 4 tests

This is a short check of server-side resources used by Post Date Time Change
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.98 ▲0.1538.85 ▲4.70
Dashboard /wp-admin3.20 ▲0.1554.06 ▲10.28
Posts /wp-admin/edit.php3.32 ▲0.2250.73 ▲10.56
Add New Post /wp-admin/post-new.php5.56 ▲0.1387.86 ▼561.48
Media Library /wp-admin/upload.php3.25 ▲0.2532.46 ▼0.07
Post Date Time Change /wp-admin/options-general.php?page=postdatetimechange3.1227.99

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 1 new option
New WordPress options
postdatetimechange

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post Date Time Change
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,717 ▲12116.00 ▲0.547.50 ▼3.7246.85 ▼3.64
Dashboard /wp-admin3,005 ▲745.91 ▼0.24137.57 ▼4.88109.57 ▼2.68
Posts /wp-admin/edit.php3,830 ▲1,0913.60 ▲0.9088.74 ▲22.5686.65 ▼2.89
Add New Post /wp-admin/post-new.php1,675 ▼819.06 ▲0.31372.69 ▼5.01108.12 ▲2.46
Media Library /wp-admin/upload.php1,927 ▲1175.46 ▲0.43131.77 ▼19.47121.97 ▼1.33
Post Date Time Change /wp-admin/options-general.php?page=postdatetimechange1,4742.5465.8849.80

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 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
Please take a closer look at the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/post-date-time-change/lib/class-postdatetimechange.php:59
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-date-time-change/lib/class-postdatetimechangeregist.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-date-time-change/lib/class-postdatetimechangeregist.php:37

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)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: edit, media, post, date, page...

post-date-time-change/postdatetimechange.php 92% from 13 tests

The main PHP script in "Post Date Time Change" version 5.08 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("post-date-time-change.php" instead of "postdatetimechange.php")

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 detected2,433 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript51921061,307
PHP4129229739
CSS3252387

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity48.00
▷ Minimum class complexity10.00
▷ Maximum class complexity86.00
Average method complexity5.09
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods1773.91%
▷ Protected methods00.00%
▷ Private methods626.09%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin