84% quote-of-the-day-and-random-quote

Code Review | Quote of the Day and Random Quote

WordPress plugin Quote of the Day and Random Quote scored 84% from 54 tests.

About plugin

  • Plugin page: quote-of-the-day-...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7.0-4.8
  • WordPress version: 6.3.1
  • First release: Nov 2, 2013
  • Latest release: Sep 8, 2018
  • Number of updates: 16
  • Update frequency: every 110.7 days
  • Top authors: dailyverses (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active / 9,510 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.59ms] Passed 4 tests

A check of server-side resources used by Quote of the Day and Random Quote
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.16 ▲3.25
Dashboard /wp-admin3.32 ▲0.0244.12 ▼9.01
Posts /wp-admin/edit.php3.37 ▲0.0243.43 ▼0.15
Add New Post /wp-admin/post-new.php5.90 ▲0.0282.48 ▼11.56
Media Library /wp-admin/upload.php3.25 ▲0.0231.35 ▼5.65

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_welovequotes_quoteofthedaywidget
widget_recent-comments
widget_welovequotes_randomquotewidget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Quote of the Day and Random Quote
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.14 ▼1.211.69 ▼0.0647.54 ▲1.24
Dashboard /wp-admin2,203 ▲155.79 ▼0.1397.56 ▼15.8038.85 ▼6.48
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0038.88 ▲2.4734.17 ▲0.02
Add New Post /wp-admin/post-new.php1,537 ▲418.43 ▼4.70586.48 ▼81.3752.01 ▼14.24
Media Library /wp-admin/upload.php1,388 ▼04.18 ▲0.0193.08 ▼8.6940.01 ▼5.15

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_welovequotes_randomquotewidget
    • widget_welovequotes_quoteofthedaywidget
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quote-of-the-day-and-random-quote/quote-of-the-day-and-random-quote.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Plugin Name: You should set the name of your plugin on the first line ( === quote-of-the-day-and-random-quote === )
The official readme.txt might help

quote-of-the-day-and-random-quote/quote-of-the-day-and-random-quote.php Passed 13 tests

The primary PHP file in "Quote of the Day and Random Quote" version 1.2 is used by WordPress to initiate all plugin functionality
52 characters long description:
A Quote of the Day or a Random Quote on your website

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
Everything looks great! No dangerous files found in this plugin486 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13520481
CSS1105

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.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
No PNG images were found in this plugin