84% simple-quote-rotator

Code Review | Simple Quote Rotator

WordPress plugin Simple Quote Rotator scored84%from 54 tests.

About plugin

  • Plugin page: simple-quote-rotator
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.2
  • WordPress version: 6.3.1
  • First release: Jun 2, 2016
  • Latest release: Jun 2, 2016
  • Number of updates: 8
  • Update frequency: N/A
  • Top authors: simplequoterotator (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,025 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

A check of server-side resources used by Simple Quote Rotator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.48 ▲0.48
Dashboard /wp-admin3.31 ▲0.0046.63 ▼8.06
Posts /wp-admin/edit.php3.36 ▲0.0049.10 ▼3.23
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.39 ▼0.50
Media Library /wp-admin/upload.php3.23 ▲0.0034.33 ▼5.41

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Simple Quote Rotator: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.72 ▲0.371.95 ▲0.0744.65 ▲4.34
Dashboard /wp-admin2,198 ▲215.63 ▲0.0587.49 ▼20.3037.89 ▼17.80
Posts /wp-admin/edit.php2,100 ▼31.96 ▼0.0636.62 ▼4.1134.15 ▼3.12
Add New Post /wp-admin/post-new.php1,526 ▼223.61 ▲0.42637.10 ▼47.1351.94 ▼7.31
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.1396.20 ▼21.8442.28 ▼7.38

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 detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

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 trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/simple-quote-rotator/simple-quote-rotator.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Layout screen)
You can take inspiration from this readme.txt

simple-quote-rotator/simple-quote-rotator.php 92% from 13 tests

"Simple Quote Rotator" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin90 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
XML10079
PHP1102411

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.00
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%
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
3 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/quote2.png0.57KB0.72KB0.00%
screenshot-1.png51.60KB22.90KB▼ 55.61%
images/quote.png0.48KB0.69KB0.00%