83% daily-quote-by-quote-land

Code Review | Quote of the Day by QuoteLand

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

About plugin

  • Plugin page: daily-quote-by-qu...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 6.3.1
  • First release: Jan 21, 2014
  • Latest release: Jan 30, 2014
  • Number of updates: 6
  • Update frequency: every 7.0 days
  • Top authors: alexraescu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 6,598 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

An overview of server-side resources used by Quote of the Day by QuoteLand
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.40 ▼1.06
Dashboard /wp-admin3.32 ▲0.0246.20 ▼3.45
Posts /wp-admin/edit.php3.37 ▲0.0246.13 ▼1.30
Add New Post /wp-admin/post-new.php5.90 ▲0.0288.67 ▼8.60
Media Library /wp-admin/upload.php3.24 ▲0.0240.41 ▲5.36

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_foo_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Quote of the Day by QuoteLand
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.44 ▲0.271.93 ▼0.0338.82 ▼15.25
Dashboard /wp-admin2,209 ▲174.89 ▼1.0498.92 ▼18.4239.38 ▼4.41
Posts /wp-admin/edit.php2,089 ▲32.05 ▲0.0342.19 ▲5.1035.71 ▲1.29
Add New Post /wp-admin/post-new.php1,534 ▲1422.97 ▲0.03692.94 ▲20.3549.44 ▼4.76
Media Library /wp-admin/upload.php1,388 ▲34.20 ▼0.0195.08 ▼34.0840.52 ▼7.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • widget_foo_widget
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/daily-quote-by-quote-land/dailyquote_widget.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
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 uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (Configuring the widget on the admin screen (Appearance, Widgets).), #2 (Example of the widget using the default theme.)
You can take inspiration from this readme.txt

daily-quote-by-quote-land/dailyquote_widget.php 85% from 13 tests

The main PHP script in "Quote of the Day by QuoteLand" version 1.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("daily-quote-by-quote-land.php" instead of "dailyquote_widget.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 193 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected50 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1235450

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin