84% add-post-last-updated-date-for-wp

Code Review | Add Post Last Updated Date For WP

WordPress plugin Add Post Last Updated Date For WP scored84%from 54 tests.

About plugin

  • Plugin page: add-post-last-upd...
  • Plugin version: 1.0
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-6.0
  • WordPress version: 6.3.1
  • First release: Jan 22, 2019
  • Latest release: Jul 2, 2022
  • Number of updates: 11
  • Update frequency: every 114.4 days
  • Top authors: aftabmuni (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,383 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.56ms] Passed 4 tests

Server-side resources used by Add Post Last Updated Date For WP
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.86 ▼0.63
Dashboard /wp-admin3.32 ▲0.0147.08 ▼5.86
Posts /wp-admin/edit.php3.37 ▲0.0143.40 ▼2.54
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.89 ▼5.21
Media Library /wp-admin/upload.php3.24 ▲0.0136.14 ▲1.32

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Add Post Last Updated Date For WP
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.24 ▼1.151.85 ▼0.0342.99 ▼7.25
Dashboard /wp-admin2,206 ▲185.86 ▲0.9996.11 ▼21.4538.14 ▼7.48
Posts /wp-admin/edit.php2,086 ▼32.03 ▲0.0234.03 ▼5.1233.05 ▼2.17
Add New Post /wp-admin/post-new.php1,542 ▲2318.28 ▼4.64623.80 ▼42.7366.74 ▲5.08
Media Library /wp-admin/upload.php1,388 ▼04.17 ▼0.0297.18 ▼5.1242.75 ▼1.82

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
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/add-post-last-updated-date-for-wp/add-post-last-updated-wp.php:23

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)
Everything seems fine on the user side

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
3 plugin tags: post modified on, last updated date to post, add last modified date in post

add-post-last-updated-date-for-wp/add-post-last-updated-wp.php 92% from 13 tests

The entry point to "Add Post Last Updated Date For WP" version 1.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("add-post-last-updated-date-for-wp.php" instead of "add-post-last-updated-wp.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
Good job! No executable or dangerous file extensions detected36 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP171836

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected