84% posts-on-this-day

Code Review | Posts On This Day

WordPress plugin Posts On This Day scored84%from 54 tests.

About plugin

  • Plugin page: posts-on-this-day
  • Plugin version: 1.5.5
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Mar 9, 2021
  • Latest release: Sep 5, 2023
  • Number of updates: 22
  • Update frequency: every 41.4 days
  • Top authors: jeherve (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,355 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.23MB] [CPU: ▼0.56ms] Passed 4 tests

This is a short check of server-side resources used by Posts On This Day
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2838.53 ▼2.98
Dashboard /wp-admin3.57 ▲0.2644.97 ▼3.80
Posts /wp-admin/edit.php3.62 ▲0.2645.89 ▲1.42
Add New Post /wp-admin/post-new.php6.09 ▲0.2082.90 ▲4.49
Media Library /wp-admin/upload.php3.43 ▲0.2037.52 ▲3.13

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 63 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Posts On This Day
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.381.63 ▼0.0338.81 ▼8.93
Dashboard /wp-admin2,195 ▲185.54 ▼0.0183.08 ▼8.5536.82 ▼6.48
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0535.88 ▼1.6733.15 ▼4.81
Add New Post /wp-admin/post-new.php1,526 ▼023.25 ▼0.36657.03 ▼17.2554.20 ▲5.24
Media Library /wp-admin/upload.php1,397 ▼34.17 ▼0.01110.05 ▲11.1048.12 ▲1.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_posts_on_this_day
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Jeherve\\Posts_On_This_Day\\plugin_dir_path() in wp-content/plugins/posts-on-this-day/posts-on-this-day.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Automattic\\Jetpack\\Autoloader\\jpd93ea4de39019a1ed66b1221fd3a3f61\\wp_normalize_path() in wp-content/plugins/posts-on-this-day/vendor/jetpack-autoloader/class-path-processor.php:73
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/posts-on-this-day/vendor/automattic/jetpack-autoloader/src/jetpack-autoloader/class-autoloader.php' (include_path='.:/usr/share/php') in wp-content/plugins/posts-on-this-day/vendor/automattic/jetpack-autoloader/src/autoload.php on line 4
    • > PHP Warning
      require_once(wp-content/plugins/posts-on-this-day/vendor/automattic/jetpack-autoloader/src/jetpack-autoloader/class-autoloader.php): failed to open stream: No such file or directory in wp-content/plugins/posts-on-this-day/vendor/automattic/jetpack-autoloader/src/autoload.php on line 4
    • > PHP Fatal error
      Uncaught Error: Interface 'Composer\\Plugin\\PluginInterface' not found in wp-content/plugins/posts-on-this-day/vendor/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/posts-on-this-day/src/class-posts-on-this-day-widget.php:17

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 errors were detected


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: widget, on this day

posts-on-this-day/posts-on-this-day.php Passed 13 tests

The entry point to "Posts On This Day" version 1.5.5 is a PHP file that has certain tags in its header comment area
118 characters long description:
Widget to display a list of posts published "on this day" in years past. A good little bit of nostalgia for your blog.

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
There were no executable files found in this plugin3,399 lines of code in 58 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity12.15
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes40100.00%
▷ Final classes00.00%
▷ Static methods3116.85%
▷ Public methods14176.63%
▷ Protected methods84.35%
▷ Private methods3519.02%
▷ Named functions00.00%
▷ Anonymous functions7100.00%
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.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