83% quote-of-the-day-by-brainyquote

Code Review | Quote of the Day by BrainyQuote

WordPress plugin Quote of the Day by BrainyQuote scored83%from 54 tests.

About plugin

  • Plugin page: quote-of-the-day-...
  • Plugin version: 1.20
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5.1
  • WordPress version: 6.3.1
  • First release: Nov 21, 2013
  • Latest release: Oct 25, 2020
  • Number of updates: 35
  • Update frequency: every 72.3 days
  • Top authors: brainyquote (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

400+ active /18,292 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.36ms] Passed 4 tests

This is a short check of server-side resources used by Quote of the Day by BrainyQuote
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.04 ▼2.44
Dashboard /wp-admin3.31 ▲0.0142.39 ▼7.61
Posts /wp-admin/edit.php3.36 ▲0.0149.32 ▲3.77
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.64 ▼11.01
Media Library /wp-admin/upload.php3.24 ▲0.0132.90 ▼0.37

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_foo_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Quote of the Day by BrainyQuote
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.17 ▼1.502.08 ▲0.1743.01 ▼3.65
Dashboard /wp-admin2,200 ▲125.82 ▼0.11104.21 ▼7.5840.47 ▼4.60
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0139.17 ▲2.4035.34 ▼1.17
Add New Post /wp-admin/post-new.php1,542 ▲718.48 ▼4.99640.89 ▼15.6948.78 ▼4.45
Media Library /wp-admin/upload.php1,388 ▲64.20 ▼0.0995.39 ▼5.7152.02 ▲9.24

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_foo_widget
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

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)
Good news, no errors were detected

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 items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/quote-of-the-day-by-brainyquote/brainyquote_widget.php:29

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)
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
  • Screenshots: These screenshots lack descriptions #2, #3, #4 in quote-of-the-day-by-brainyquote/assets to your readme.txt
You can look at the official readme.txt

quote-of-the-day-by-brainyquote/brainyquote_widget.php 85% from 13 tests

Analyzing the main PHP file in "Quote of the Day by BrainyQuote" version 1.20
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 188 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("quote-of-the-day-by-brainyquote.php" instead of "brainyquote_widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin55 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1145255

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected