83% quote-of-the-day-site2quotes-widget

Code Review | Quote of the Day Site2Quotes Widget

WordPress plugin Quote of the Day Site2Quotes Widget scored83%from 54 tests.

About plugin

  • Plugin page: quote-of-the-day-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Dec 31, 2014
  • Latest release: Jul 9, 2016
  • Number of updates: 138
  • Update frequency: every 4.0 days
  • Top authors: site2quotes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /5,979 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
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.85ms] Passed 4 tests

A check of server-side resources used by Quote of the Day Site2Quotes Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0338.37 ▼0.24
Dashboard /wp-admin3.34 ▲0.0345.94 ▼3.99
Posts /wp-admin/edit.php3.39 ▲0.0342.59 ▼2.99
Add New Post /wp-admin/post-new.php5.92 ▲0.0380.69 ▼14.85
Media Library /wp-admin/upload.php3.26 ▲0.0333.66 ▼1.56

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: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_site2quotes_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Quote of the Day Site2Quotes Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.17 ▼1.411.76 ▲0.0443.63 ▲0.27
Dashboard /wp-admin2,206 ▲214.87 ▼1.01109.49 ▼22.7142.19 ▼1.49
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0435.05 ▼2.2331.52 ▼4.52
Add New Post /wp-admin/post-new.php1,535 ▲223.09 ▼0.02680.53 ▼12.0952.84 ▼8.87
Media Library /wp-admin/upload.php1,388 ▲34.21 ▲0.0699.32 ▲2.5143.92 ▲0.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_site2quotes_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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 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 errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/quote-of-the-day-site2quotes-widget/site2quotes-widget.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention: The official readme.txt might help

quote-of-the-day-site2quotes-widget/site2quotes-widget.php 85% from 13 tests

This is the main PHP file of "Quote of the Day Site2Quotes Widget" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("quote-of-the-day-site2quotes-widget.php" instead of "site2quotes-widget.php")
  • Description: The description should be shorter than 140 characters (currently 362 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin109 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11454109

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity8.75
▷ Minimum method complexity1.00
▷ Maximum method complexity28.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin