10% quotepro-office-widget

Code Review | Quotepro Office Widget

WordPress plugin Quotepro Office Widget scored10%from 54 tests.

About plugin

  • Plugin page: quotepro-office-w...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-4.9.4
  • WordPress version: 6.3.1
  • First release: Apr 2, 2018
  • Latest release: Apr 2, 2018
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: quotepro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /696 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/quotepro-office-widget/plugin.php+261
    Function create_function() is deprecated

Server metrics [RAM: ▼1.90MB] [CPU: ▼54.57ms] Passed 4 tests

A check of server-side resources used by Quotepro Office Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.3810.04 ▼35.77
Dashboard /wp-admin2.10 ▼1.207.49 ▼42.05
Posts /wp-admin/edit.php2.10 ▼1.256.42 ▼45.39
Add New Post /wp-admin/post-new.php2.10 ▼3.785.68 ▼95.08
Media Library /wp-admin/upload.php2.10 ▼1.136.43 ▼29.71

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Quotepro Office Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,956 ▲19513.50 ▼1.1513.13 ▲11.4043.88 ▼9.02
Dashboard /wp-admin2,199 ▲255.65 ▼0.0288.91 ▼14.4841.79 ▲1.28
Posts /wp-admin/edit.php2,107 ▲72.00 ▼0.0442.23 ▲2.0836.36 ▲2.74
Add New Post /wp-admin/post-new.php1,530 ▲222.91 ▼0.36678.54 ▲43.3052.22 ▼6.65
Media Library /wp-admin/upload.php1,398 ▲44.21 ▲0.0096.67 ▲1.9045.16 ▲1.49

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/quotepro-office-widget/plugin.php+261
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_quotepro-office-widget

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: url in wp-content/plugins/quotepro-office-widget/views/widget.php on line 1
    • > PHP Notice
      Undefined variable: titleId in wp-content/plugins/quotepro-office-widget/views/admin.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/quotepro-office-widget/views/widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/quotepro-office-widget/views/admin.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/quotepro-office-widget/plugin.php:28
    • > PHP Notice
      Undefined variable: lang in wp-content/plugins/quotepro-office-widget/views/widget.php on line 1

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 is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: insurance, office, colorbox, widget, quotepro...

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

Analyzing the main PHP file in "Quotepro Office Widget" version 2.0.0
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("quotepro-office-widget.php" instead of "plugin.php")

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
Good job! No executable or dangerous file extensions detected247 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP36798136
CSS351849
Markdown116024
JavaScript30621
PO File10017

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.14
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity1.69
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/overlay.png0.11KB0.15KB0.00%
css/images/loading_background.png0.13KB0.15KB0.00%
css/images/border.png0.07KB0.10KB0.00%
css/images/controls.png1.23KB1.28KB0.00%