10% quotepro-insurance-widget

Code Review | Quotepro Insurance Widget

WordPress plugin Quotepro Insurance Widget scored10%from 54 tests.

About plugin

  • Plugin page: quotepro-insuranc...
  • Plugin version: 2.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-4.9.4
  • WordPress version: 6.3.1
  • First release: Apr 28, 2015
  • Latest release: Apr 2, 2018
  • Number of updates: 41
  • Update frequency: every 26.1 days
  • Top authors: quotepro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /3,699 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/quotepro-insurance-widget/plugin.php+300
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼53.40ms] Passed 4 tests

Server-side resources used by Quotepro Insurance Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.446.84 ▼40.37
Dashboard /wp-admin2.05 ▼1.266.00 ▼42.64
Posts /wp-admin/edit.php2.05 ▼1.315.48 ▼42.73
Add New Post /wp-admin/post-new.php2.05 ▼3.845.35 ▼87.84
Media Library /wp-admin/upload.php2.05 ▼1.186.38 ▼28.56

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_quotepro-insurance-widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Quotepro Insurance Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,959 ▲21313.69 ▼0.6012.44 ▲10.2538.96 ▼3.81
Dashboard /wp-admin2,206 ▲155.81 ▲0.93103.06 ▼13.1838.20 ▼9.47
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0437.21 ▼3.2034.80 ▼2.37
Add New Post /wp-admin/post-new.php1,533 ▼023.07 ▼0.22679.90 ▲2.5649.55 ▼10.09
Media Library /wp-admin/upload.php1,385 ▼34.19 ▲0.0799.48 ▼12.2441.27 ▼6.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/quotepro-insurance-widget/plugin.php+300
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_quotepro-insurance-widget
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: titleId in wp-content/plugins/quotepro-insurance-widget/views/admin.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/quotepro-insurance-widget/views/widget.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/quotepro-insurance-widget/views/admin.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/quotepro-insurance-widget/plugin.php:28

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: quotepro, insurance, widget, colorbox

quotepro-insurance-widget/plugin.php 92% from 13 tests

This is the main PHP file of "Quotepro Insurance Widget" version 2.0.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("quotepro-insurance-widget.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected423 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP38097229
PO File23745100
CSS381858
JavaScript30636

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity3.08
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/controls.png1.23KB1.28KB0.00%
css/images/border.png0.07KB0.10KB0.00%
css/images/overlay.png0.11KB0.15KB0.00%
css/images/loading_background.png0.13KB0.15KB0.00%