84% day-of-week

Code Review | DayOfWeek Widget

WordPress plugin DayOfWeek Widget scored84%from 54 tests.

About plugin

  • Plugin page: day-of-week
  • Plugin version: 1.7.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Oct 26, 2017
  • Latest release: Aug 26, 2023
  • Number of updates: 41
  • Update frequency: every 52.0 days
  • Top authors: broadcastwidgets (97.56%)peachysoftware (4.88%)

Code review

54 tests

User reviews

4 reviews

Install metrics

500+ active /8,231 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼11.69ms] Passed 4 tests

Server-side resources used by DayOfWeek Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0539.52 ▼1.74
Dashboard /wp-admin3.37 ▲0.0646.92 ▼6.50
Posts /wp-admin/edit.php3.42 ▲0.0655.30 ▲5.56
Add New Post /wp-admin/post-new.php5.94 ▲0.0586.12 ▼26.41
Media Library /wp-admin/upload.php3.29 ▲0.0632.05 ▼12.10

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_dayofweek_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

DayOfWeek Widget: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲9313.28 ▼1.162.15 ▲0.3843.74 ▼0.43
Dashboard /wp-admin2,220 ▲285.84 ▲0.8796.81 ▼13.8639.72 ▼2.25
Posts /wp-admin/edit.php2,103 ▲141.99 ▼0.0538.60 ▼1.3134.22 ▼0.28
Add New Post /wp-admin/post-new.php1,549 ▼11918.09 ▼4.09638.46 ▼40.8058.39 ▲1.17
Media Library /wp-admin/upload.php1,405 ▲174.23 ▼0.0295.41 ▼1.6042.10 ▼1.97

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
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_dayofweek_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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
Please fix 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/day-of-week/dayofweek.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid URI found ("")
The official readme.txt might help

day-of-week/dayofweek.php 92% from 13 tests

This is the main PHP file of "DayOfWeek Widget" version 1.7.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("day-of-week.php" instead of "dayofweek.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin361 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13628350
CSS13111

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/dayofweekpro.png74.93KB28.02KB▼ 62.60%
images/peachytext.png9.05KB5.15KB▼ 43.04%
images/peach100.png4.09KB2.05KB▼ 49.89%