74% thoughts-of-the-day

Code Review | Thoughts Of The Day

WordPress plugin Thoughts Of The Day scored 74% from 54 tests.

About plugin

  • Plugin page: thoughts-of-the-day
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5
  • WordPress version: 5.8.1
  • First release: Sep 12, 2013
  • Latest release: Sep 12, 2013
  • Number of updates: 6
  • Update frequency: N/A
  • Top authors: mejar (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,079 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.90MB] [CPU: ▼171.72ms] Passed 4 tests

Server-side resources used by Thoughts Of The Day
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1230.31 ▲8.10
Dashboard /wp-admin2.74 ▼0.3121.57 ▼22.75
Posts /wp-admin/edit.php2.75 ▼0.3620.96 ▼22.62
Add New Post /wp-admin/post-new.php2.75 ▼2.6923.41 ▼629.30
Media Library /wp-admin/upload.php2.75 ▼0.2618.77 ▼12.20

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 1 new option
New WordPress options
thought_text

Browser metrics Passed 4 tests

A check of browser resources used by Thoughts Of The Day
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,722 ▲12615.85 ▲0.268.30 ▲0.4048.90 ▲1.03
Dashboard /wp-admin2,985 ▲595.89 ▼0.04129.25 ▼17.22145.95 ▲32.78
Posts /wp-admin/edit.php2,759 ▲202.58 ▼0.1162.86 ▼5.8894.31 ▲2.13
Add New Post /wp-admin/post-new.php1,885 ▲27019.19 ▼2.24400.84 ▲117.57109.86 ▲4.56
Media Library /wp-admin/upload.php1,770 ▼374.96 ▼0.08126.32 ▼29.35134.67 ▲12.32

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options were found after uninstall: 1 option
    • thought_text

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)
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/thoughts-of-the-day/thoughts-of-the-day.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 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
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Admin Panel), #2 (Default Display)
  • Plugin Name: You should set the name of your plugin on the first line ( === thoughts-of-the-day === )
You can take inspiration from this readme.txt

thoughts-of-the-day/thoughts-of-the-day.php Passed 13 tests

This is the main PHP file of "Thoughts Of The Day" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
121 characters long description:
Plugin is to show daily thought, can add thoughts in each line for each day and will show the each line according to day.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin40 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16740

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
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.03MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png12.73KB5.75KB▼ 54.86%
thought.png3.43KB0.90KB▼ 73.66%
screenshot-2.png10.85KB6.24KB▼ 42.44%