84% simple-random-quote

Code Review | Simple Random Quote

WordPress plugin Simple Random Quote scored 84% from 54 tests.

About plugin

  • Plugin page: simple-random-quote
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 19, 2016
  • Latest release: May 16, 2016
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: borislutskovsky (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 538 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

Analyzing server-side resources used by Simple Random Quote
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.00 ▲0.75
Dashboard /wp-admin3.31 ▲0.0144.73 ▼5.65
Posts /wp-admin/edit.php3.36 ▲0.0045.86 ▼0.11
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.75 ▼23.23
Media Library /wp-admin/upload.php3.23 ▲0.0032.03 ▼1.43

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Simple Random Quote
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.64 ▼0.711.78 ▼0.0944.17 ▲1.81
Dashboard /wp-admin2,222 ▲314.84 ▼0.08110.59 ▲6.3440.66 ▼0.10
Posts /wp-admin/edit.php2,105 ▲162.05 ▼0.0839.85 ▲2.8535.02 ▲0.94
Add New Post /wp-admin/post-new.php1,546 ▲1823.21 ▲5.12635.02 ▼10.0455.50 ▼17.37
Media Library /wp-admin/upload.php1,404 ▲194.19 ▼0.2094.70 ▼1.9043.85 ▲1.24

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
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/simple-random-quote/wp-random-quote.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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:
  • Contributors: The plugin contributors field is missing
You can take inspiration from this readme.txt

simple-random-quote/wp-random-quote.php 92% from 13 tests

The primary PHP file in "Simple Random Quote" version 1.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-random-quote.php" instead of "wp-random-quote.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected34 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP113834

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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
There were not PNG files found in your plugin