10% quotepro-payment-widget

Code Review | Quotepro Payment Widget

WordPress plugin Quotepro Payment Widget scored10%from 54 tests.

About plugin

  • Plugin page: quotepro-payment-...
  • 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: Aug 18, 2017
  • Latest release: Apr 2, 2018
  • Number of updates: 3
  • Update frequency: every 75.7 days
  • Top authors: quotepro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,090 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
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/quotepro-payment-widget/plugin.php+279
    Function create_function() is deprecated

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

An overview of server-side resources used by Quotepro Payment Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.28 ▼32.23
Dashboard /wp-admin2.05 ▼1.265.08 ▼38.58
Posts /wp-admin/edit.php2.05 ▼1.316.95 ▼41.02
Add New Post /wp-admin/post-new.php2.05 ▼3.845.48 ▼96.86
Media Library /wp-admin/upload.php2.05 ▼1.185.24 ▼28.11

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 22 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
widget_quotepro-payment-widget
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Quotepro Payment Widget: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,992 ▲24614.11 ▼0.269.21 ▲7.2837.50 ▼0.50
Dashboard /wp-admin2,207 ▲155.86 ▼0.0794.61 ▼18.7636.56 ▼6.28
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0537.27 ▲1.8333.06 ▼2.52
Add New Post /wp-admin/post-new.php1,518 ▼1517.59 ▼5.49595.75 ▼44.7750.36 ▼2.86
Media Library /wp-admin/upload.php1,389 ▼24.24 ▲0.0394.16 ▼1.7441.91 ▲0.40

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/quotepro-payment-widget/plugin.php+279
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_quotepro-payment-widget
    • widget_recent-comments
    • 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 | 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
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/quotepro-payment-widget/views/widget.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/quotepro-payment-widget/plugin.php:28
    • > PHP Notice
      Undefined variable: titleId in wp-content/plugins/quotepro-payment-widget/views/admin.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/quotepro-payment-widget/views/admin.php:2
    • > PHP Notice
      Undefined variable: lang in wp-content/plugins/quotepro-payment-widget/views/widget.php on line 1
    • > PHP Notice
      Undefined variable: url in wp-content/plugins/quotepro-payment-widget/views/widget.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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 to be fixed: You can take inspiration from this readme.txt

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

The primary PHP file in "Quotepro Payment Widget" version 2.0.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("quotepro-payment-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
No dangerous file extensions were detected265 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP37398148
CSS351849
Markdown118028
JavaScript30623
PO File10017

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity2.31
▷ Minimum method complexity1.00
▷ Maximum method complexity9.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.19MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png89.61KB23.20KB▼ 74.11%
assets/screenshot-1.png15.69KB4.88KB▼ 68.90%
css/images/loading_background.png0.13KB0.15KB0.00%
css/images/overlay.png0.11KB0.15KB0.00%
assets/screenshot-3.png84.74KB27.11KB▼ 68.01%