84% quote-of-the-day-by-libquotes

Code Review | Quote of the Day by LibQuotes

WordPress plugin Quote of the Day by LibQuotes scored84%from 54 tests.

About plugin

  • Plugin page: quote-of-the-day-...
  • Plugin version: 1.12
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 5, 2017
  • Latest release: Feb 12, 2023
  • Number of updates: 10
  • Update frequency: every 192.6 days
  • Top authors: libquotes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /862 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
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Quote of the Day by LibQuotes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.21 ▲5.72
Dashboard /wp-admin3.32 ▲0.0245.72 ▼4.17
Posts /wp-admin/edit.php3.37 ▲0.0243.76 ▼1.26
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.33 ▼0.78
Media Library /wp-admin/upload.php3.25 ▲0.0233.32 ▼1.23

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_lib_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Quote of the Day by LibQuotes: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.28 ▼0.041.88 ▼0.0247.20 ▲4.35
Dashboard /wp-admin2,195 ▲215.57 ▼0.0483.98 ▼1.7838.05 ▼0.56
Posts /wp-admin/edit.php2,100 ▲181.95 ▼0.0835.94 ▼0.3333.56 ▼0.28
Add New Post /wp-admin/post-new.php1,526 ▼223.29 ▼0.02682.17 ▼27.2152.94 ▼5.00
Media Library /wp-admin/upload.php1,397 ▼34.30 ▲0.1095.83 ▼12.4842.67 ▼4.27

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_lib_widget
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/quote-of-the-day-by-libquotes/libquotes_wp_widget.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: widget, library, libquotes, quote of the day, sidebar...

quote-of-the-day-by-libquotes/libquotes_wp_widget.php 92% from 13 tests

The main PHP file in "Quote of the Day by LibQuotes" ver. 1.12 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("quote-of-the-day-by-libquotes.php" instead of "libquotes_wp_widget.php")

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
No dangerous file extensions were detected49 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP181049

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.25
▷ Minimum method complexity1.00
▷ Maximum method complexity4.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected