83% quotations-book-quotes-of-the-day

Code Review | Quote of the Day by Quotations Book

WordPress plugin Quote of the Day by Quotations Book scored 83% from 54 tests.

About plugin

  • Plugin page: quotations-book-q...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8.1
  • WordPress version: 5.8.1
  • First release: Oct 14, 2014
  • Latest release: Oct 14, 2014
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: quotationsbook (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 733 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼137.94ms] Passed 4 tests

Server-side resources used by Quote of the Day by Quotations Book
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1240.05 ▲18.68
Dashboard /wp-admin3.07 ▲0.0166.49 ▲17.94
Posts /wp-admin/edit.php3.12 ▲0.0043.50 ▼10.72
Add New Post /wp-admin/post-new.php5.42 ▼0.0187.86 ▼555.55
Media Library /wp-admin/upload.php3.01 ▲0.0131.36 ▼3.44

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 1 new option
New WordPress options
widget_foo_widget

Browser metrics Passed 4 tests

A check of browser resources used by Quote of the Day by Quotations Book
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲4216.34 ▲0.3810.92 ▲1.9163.58 ▲17.55
Dashboard /wp-admin2,973 ▲395.88 ▼0.10146.81 ▼6.49115.72 ▼2.50
Posts /wp-admin/edit.php2,739 ▼02.72 ▼0.0063.64 ▼10.8190.71 ▲4.65
Add New Post /wp-admin/post-new.php1,675 ▲8118.80 ▲0.01400.78 ▼29.91116.18 ▲10.09
Media Library /wp-admin/upload.php1,807 ▼05.02 ▼0.03159.55 ▼19.99110.95 ▼11.75

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 1 option
    • widget_foo_widget

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 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/quotations-book-quotes-of-the-day/qb_widget.php:29

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention: Please take inspiration from this readme.txt

quotations-book-quotes-of-the-day/qb_widget.php 85% from 13 tests

"Quote of the Day by Quotations Book" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 191 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("quotations-book-quotes-of-the-day.php" instead of "qb_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 detected47 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1145147

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin