84% quotes-random

Code Review | Quotes Random

WordPress plugin Quotes Random scored84%from 54 tests.

About plugin

  • Plugin page: quotes-random
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7.0-3.8.1
  • WordPress version: 6.3.1
  • First release: Feb 24, 2014
  • Latest release: Mar 1, 2014
  • Number of updates: 14
  • Update frequency: every 0.4 days
  • Top authors: quotes8 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,327 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.26MB] [CPU: ▼6.67ms] Passed 4 tests

This is a short check of server-side resources used by Quotes Random
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2437.18 ▼2.86
Dashboard /wp-admin3.61 ▲0.3044.38 ▼1.50
Posts /wp-admin/edit.php3.66 ▲0.3047.58 ▼3.86
Add New Post /wp-admin/post-new.php6.13 ▲0.2483.10 ▼18.46
Media Library /wp-admin/upload.php3.47 ▲0.2437.49 ▲3.02

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Quotes Random
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.64 ▼0.751.66 ▼0.2140.81 ▼4.04
Dashboard /wp-admin2,203 ▲125.83 ▼0.07107.46 ▼3.8542.22 ▼3.50
Posts /wp-admin/edit.php2,086 ▼62.00 ▼0.0334.64 ▼9.4731.20 ▼4.06
Add New Post /wp-admin/post-new.php1,533 ▲523.12 ▲4.93642.67 ▲22.2560.49 ▼3.13
Media Library /wp-admin/upload.php1,391 ▲34.21 ▼0.10100.51 ▲3.1143.09 ▼2.07

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_quotesrandom
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 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/quotes-random/QuotesRandom.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% 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:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can look at the official readme.txt

quotes-random/QuotesRandom.php 92% from 13 tests

"Quotes Random" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("quotes-random.php" instead of "QuotesRandom.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
Everything looks great! No dangerous files found in this plugin1,337 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22072621,337

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity110.67
▷ Minimum class complexity5.00
▷ Maximum class complexity197.00
Average method complexity4.70
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods89
▷ Static methods11.12%
▷ Public methods7382.02%
▷ Protected methods1617.98%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants21100.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