71% saint-of-the-day

Code Review | Saint of the Day

WordPress plugin Saint of the Day scored71%from 54 tests.

About plugin

  • Plugin page: saint-of-the-day
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4.1
  • WordPress version: 6.3.1
  • First release: Sep 24, 2021
  • Latest release: Nov 24, 2023
  • Number of updates: 4
  • Update frequency: every 197.8 days
  • Top authors: BearlyDoug (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /451 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.97ms] Passed 4 tests

Analyzing server-side resources used by Saint of the Day
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.68 ▼3.31
Dashboard /wp-admin3.36 ▲0.0148.43 ▼14.19
Posts /wp-admin/edit.php3.41 ▲0.0549.14 ▼1.91
Add New Post /wp-admin/post-new.php5.96 ▲0.0792.70 ▼0.45
Media Library /wp-admin/upload.php3.28 ▲0.0539.78 ▲1.62
BD Plugins /wp-admin/admin.php?page=bearlydoug3.2631.73
Saint of the Day /wp-admin/admin.php?page=sotd3.2531.55

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Saint of the Day
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲7714.11 ▼0.161.66 ▼0.1338.96 ▼11.17
Dashboard /wp-admin2,212 ▲345.57 ▼0.1097.53 ▼13.9081.86 ▲37.44
Posts /wp-admin/edit.php2,138 ▲381.94 ▼0.0239.06 ▼3.1234.76 ▼3.06
Add New Post /wp-admin/post-new.php1,559 ▲3323.20 ▲0.09691.30 ▲8.8254.72 ▲2.56
Media Library /wp-admin/upload.php1,429 ▲324.14 ▼0.06101.73 ▼0.5972.01 ▲26.11
BD Plugins /wp-admin/admin.php?page=bearlydoug1,4122.0024.6935.15
Saint of the Day /wp-admin/admin.php?page=sotd8922.0025.0234.49

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/saint-of-the-day/images/index.php
    • > /wp-content/plugins/saint-of-the-day/sotd.php
    • > /wp-content/plugins/saint-of-the-day/includes/index.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/saint-of-the-day/functions-bd.php:49

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sotd
    • > Network (severe)
    wp-content/plugins/saint-of-the-day/includes/_CSS-sotd.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sotd
    • > Network (severe)
    wp-content/plugins/saint-of-the-day/includes/_JS-bearlydoug.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=sotd
    • > Network (severe)
    wp-content/plugins/saint-of-the-day/includes/_JS-sotdSCBuilder.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add an image for screenshot #4 (WP Admin interface)
  • Screenshots: A description for screenshot #2 is required in saint-of-the-day/assets to your readme.txt
Please take inspiration from this readme.txt

saint-of-the-day/sotd.php 77% from 13 tests

The main PHP script in "Saint of the Day" version 1.0.2 is automatically included on every request by WordPress
It is important to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("5.5" instead of "5.2")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("saint-of-the-day.php" instead of "sotd.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 378 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected687 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS17637442
PHP32791245

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
5 PNG files occupy 0.18MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/gutenborg.png161.82KB51.46KB▼ 68.20%
images/disable-gutenberg-plugin-icon.png16.22KB16.21KB0.05%
images/vimeo.png0.55KB0.67KB0.00%
images/spacer.png0.27KB0.09KB▼ 64.60%
images/delete.png0.96KB0.69KB▼ 27.68%