10% quote-of-the-moment

Code Review | Quote Of The Moment

WordPress plugin Quote Of The Moment scored 10% from 54 tests.

About plugin

  • Plugin page: quote-of-the-moment
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.1
  • WordPress version: 6.3.1
  • First release: Feb 12, 2015
  • Latest release: Feb 12, 2015
  • Number of updates: 7
  • Update frequency: every 1.7 days
  • Top authors: spoffle (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,457 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/quote-of-the-moment/quote-of-the-moment.php+25
    Constant __ROOT__ already defined

Server metrics [RAM: ▼1.93MB] [CPU: ▼50.16ms] Passed 4 tests

Analyzing server-side resources used by Quote Of The Moment
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.404.21 ▼37.08
Dashboard /wp-admin2.08 ▼1.226.50 ▼40.51
Posts /wp-admin/edit.php2.08 ▼1.286.62 ▼39.37
Add New Post /wp-admin/post-new.php2.08 ▼3.816.46 ▼83.66
Media Library /wp-admin/upload.php2.08 ▼1.155.63 ▼29.51
Quote of the moment /wp-admin/options-general.php?page=qotm2.085.51

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Quote Of The Moment
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,895 ▲16014.14 ▼0.246.49 ▲4.7639.02 ▼6.32
Dashboard /wp-admin2,212 ▲234.84 ▼0.10100.64 ▼20.6039.84 ▼5.91
Posts /wp-admin/edit.php2,098 ▲92.04 ▲0.0139.81 ▲3.4437.29 ▼1.39
Add New Post /wp-admin/post-new.php1,538 ▲523.22 ▼0.02646.29 ▼69.4550.96 ▼12.24
Media Library /wp-admin/upload.php1,397 ▲94.19 ▼0.0295.09 ▼14.3340.84 ▼5.65
Quote of the moment /wp-admin/options-general.php?page=qotm8092.0625.0126.74

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/quote-of-the-moment/quote-of-the-moment.php+25
    Constant __ROOT__ already defined
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_qotm_widget
    • theysaidso_admin_options
    • qotm_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=qotm
    • > Notice in wp-content/plugins/quote-of-the-moment/quote-of-the-moment.php+25
    Constant __ROOT__ already defined
    • > GET request to /wp-admin/options-general.php?page=qotm
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the qotm_plugin_script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/options-general.php?page=qotm
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the qotm_plugin_script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

SRP 50% 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 perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/quote-of-the-moment/admin.php
    • > /wp-content/plugins/quote-of-the-moment/quote-of-the-moment.php
    • > /wp-content/plugins/quote-of-the-moment/qotm_widget.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: inspirational quotes, random quotes, quotes, quote of the day

quote-of-the-moment/quote-of-the-moment.php Passed 13 tests

"Quote Of The Moment" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
54 characters long description:
A widgetized and themeable inspirational quote plugin.

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
There were no executable files found in this plugin152 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP32232112
JavaScript13032
CSS1108

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.13
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected