78% easy-random-quotes

Code Review | Easy Random Quotes

WordPress plugin Easy Random Quotes scored78%from 54 tests.

About plugin

  • Plugin page: easy-random-quotes
  • Plugin version: 1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.6
  • WordPress version: 6.3.1
  • First release: May 27, 2010
  • Latest release: Sep 29, 2016
  • Number of updates: 25
  • Update frequency: every 92.7 days
  • Top authors: trepmal (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

800+ active /20,097 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.12MB] [CPU: ▼13.82ms] Passed 4 tests

Server-side resources used by Easy Random Quotes
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0636.44 ▼7.11
Dashboard /wp-admin3.25 ▼0.0532.06 ▼14.63
Posts /wp-admin/edit.php3.31 ▼0.0537.00 ▼7.08
Add New Post /wp-admin/post-new.php5.50 ▼0.3969.45 ▼26.46
Media Library /wp-admin/upload.php3.25 ▲0.0232.24 ▼5.75
Easy Random Quotes /wp-admin/options-general.php?page=easy-random-quotes/kl-easyrandomquotes.php3.2229.61

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_kl-erq
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Easy Random Quotes
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.33 ▼1.411.73 ▼0.1141.29 ▼1.84
Dashboard /wp-admin2,207 ▲155.83 ▲0.9099.37 ▼20.6937.85 ▼6.21
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0233.64 ▼3.6233.22 ▲0.97
Add New Post /wp-admin/post-new.php1,517 ▼617.69 ▼5.43633.94 ▼44.4448.90 ▼5.03
Media Library /wp-admin/upload.php1,395 ▲104.18 ▼0.0393.53 ▼11.9241.74 ▼1.09
Easy Random Quotes /wp-admin/options-general.php?page=easy-random-quotes/kl-easyrandomquotes.php8842.0622.7825.25

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • widget_kl-erq
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=easy-random-quotes/kl-easyrandomquotes.php
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.

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 trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-random-quotes/kl-easyrandomquotes.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: random quotes, widget, shortcodes, plugin

easy-random-quotes/kl-easyrandomquotes.php 92% from 13 tests

"Easy Random Quotes" version 1.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("easy-random-quotes.php" instead of "kl-easyrandomquotes.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin206 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP27951206

PHP code Passed 2 tests

An short overview of 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.20
Average class complexity11.00
▷ Minimum class complexity3.00
▷ Maximum class complexity19.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.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 images were found in this plugin