83% room-34-presents-on-this-day

Code Review | On This Day (by Room 34)

WordPress plugin On This Day (by Room 34) scored83%from 54 tests.

About plugin

  • Plugin page: room-34-presents-...
  • Plugin version: 3.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 19, 2012
  • Latest release: Jul 23, 2023
  • Number of updates: 55
  • Update frequency: every 76.4 days
  • Top authors: room34 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /3,984 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.05MB] [CPU: ▼4.02ms] Passed 4 tests

Server-side resources used by On This Day (by Room 34)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.08 ▼1.67
Dashboard /wp-admin3.36 ▲0.0259.76 ▲1.10
Posts /wp-admin/edit.php3.46 ▲0.1047.03 ▼2.17
Add New Post /wp-admin/post-new.php5.94 ▲0.0681.93 ▼13.34
Media Library /wp-admin/upload.php3.28 ▲0.0639.39 ▲6.62
On This Day /wp-admin/options-general.php?page=r34otd3.2532.58

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_r34otd
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for On This Day (by Room 34)
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.34 ▼0.791.84 ▲0.1837.63 ▼1.09
Dashboard /wp-admin2,212 ▲245.88 ▲0.07110.10 ▲11.1043.00 ▼0.59
Posts /wp-admin/edit.php2,331 ▲2452.03 ▲0.0135.18 ▼4.7832.11 ▼6.06
Add New Post /wp-admin/post-new.php1,542 ▲1418.55 ▲0.41649.67 ▲5.7655.03 ▲0.18
Media Library /wp-admin/upload.php1,391 ▲34.40 ▲0.2598.24 ▲1.7542.40 ▼1.37
On This Day /wp-admin/options-general.php?page=r34otd9962.0227.8135.92

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 does not fully uninstall, leaving 7 options in the database
    • widget_r34otd
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 4× 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/room-34-presents-on-this-day/r34-on-this-day.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/room-34-presents-on-this-day/widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/room-34-presents-on-this-day/archive.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/room-34-presents-on-this-day/admin.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: archive, calendar, posts on this day, todays date, posts on todays date...

room-34-presents-on-this-day/r34-on-this-day.php 77% from 13 tests

Analyzing the main PHP file in "On This Day (by Room 34)" version 3.1.1
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Description: Keep the plugin description shorter than 140 characters (currently 158 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("room-34-presents-on-this-day.php" instead of "r34-on-this-day.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin480 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP410063433
CSS29046
SVG1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity22.00
▷ Minimum class complexity3.00
▷ Maximum class complexity41.00
Average method complexity8.00
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions1071.43%
▷ Anonymous functions428.57%
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 were not PNG files found in your plugin