74% quote-requests-for-woocommerce

Code Review | Quote Requests for WooCommerce

WordPress plugin Quote Requests for WooCommerce scored74%from 54 tests.

About plugin

  • Plugin page: quote-requests-fo...
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.0
  • WordPress version: 6.3.1
  • First release: Jan 23, 2022
  • Latest release: Jun 8, 2022
  • Number of updates: 6
  • Update frequency: every 29.0 days
  • Top authors: deepwebsolutions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,112 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.78MB] [CPU: ▲6.04ms] 75% from 4 tests

Server-side resources used by Quote Requests for WooCommerce
It is recommended to improve the following
  • CPU: The total CPU usage must kept under 500.00ms (currently 1,821.34ms on /wp-admin/admin.php?page=quote-requests-for-woocommerce)
PageMemory (MB)CPU Time (ms)
Home /5.25 ▲1.7853.52 ▲8.51
Dashboard /wp-admin5.10 ▲1.8061.46 ▲2.95
Posts /wp-admin/edit.php5.15 ▲1.7959.31 ▲12.41
Add New Post /wp-admin/post-new.php7.62 ▲1.7394.32 ▲0.29
Media Library /wp-admin/upload.php5.02 ▲1.7959.53 ▲20.68
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius5.3642.56
Quote Requests for WooCommerce /wp-admin/admin.php?page=quote-requests-for-woocommerce5.391,821.34

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 843 new files
Database: no new tables, 11 new options
New WordPress options
theysaidso_admin_options
quote_requests_for_woocommerce_original_version
fs_accounts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
fs_active_plugins
widget_recent-posts
fs_debug_mode
...

Browser metrics Passed 4 tests

Quote Requests for WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲3614.38 ▼0.031.62 ▼0.5433.07 ▼11.34
Dashboard /wp-admin2,223 ▲495.54 ▼0.0886.58 ▼9.0143.07 ▲0.44
Posts /wp-admin/edit.php2,129 ▲292.11 ▲0.0735.83 ▼1.8536.60 ▲2.22
Add New Post /wp-admin/post-new.php1,542 ▲1623.24 ▲0.07665.37 ▲7.6461.17 ▲8.18
Media Library /wp-admin/upload.php1,428 ▲344.12 ▼0.04116.68 ▲14.8356.50 ▲10.15
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,0601.7023.5230.47
Quote Requests for WooCommerce /wp-admin/admin.php?page=quote-requests-for-woocommerce9872.0125.2259.15

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/quote-requests-for-woocommerce/vendor/freemius/wordpress-sdk/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 11 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • fs_gdpr
    • can_compress_scripts
    • quote_requests_for_woocommerce_original_version
    • fs_debug_mode
    • widget_recent-comments
    • fs_accounts
    • fs_active_plugins
    • db_upgraded
    • ...

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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 58× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'DWS_QRWC_Deps\\DI\\Definition\\Resolver\\DefinitionResolver' not found in wp-content/plugins/quote-requests-for-woocommerce/dependencies/dependency-injection/php-di/php-di/src/Definition/Resolver/ObjectCreator.php:23
    • > PHP Fatal error
      Uncaught Error: Interface 'DWS_QRWC_Deps\\DI\\Definition\\Definition' not found in wp-content/plugins/quote-requests-for-woocommerce/dependencies/dependency-injection/php-di/php-di/src/Definition/ArrayDefinition.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'DWS_QRWC_Deps\\Invoker\\ParameterResolver\\ParameterResolver' not found in wp-content/plugins/quote-requests-for-woocommerce/dependencies/dependency-injection/php-di/invoker/src/ParameterResolver/AssociativeArrayResolver.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'DWS_QRWC_Deps\\Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/quote-requests-for-woocommerce/dependencies/dependency-injection/php-di/php-di/src/Definition/Exception/InvalidDefinition.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'DWS_QRWC_Deps\\Psr\\Container\\ContainerInterface' not found in wp-content/plugins/quote-requests-for-woocommerce/dependencies/dependency-injection/php-di/php-di/src/Container.php:37
    • > PHP Fatal error
      Uncaught Error: Interface 'DWS_QRWC_Deps\\DI\\Definition\\Resolver\\DefinitionResolver' not found in wp-content/plugins/quote-requests-for-woocommerce/dependencies/dependency-injection/php-di/php-di/src/Definition/Resolver/EnvironmentVariableResolver.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'DWS_QRWC_Deps\\DI\\Definition\\Helper\\DefinitionHelper' not found in wp-content/plugins/quote-requests-for-woocommerce/dependencies/dependency-injection/php-di/php-di/src/Definition/Helper/FactoryDefinitionHelper.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'DWS_QRWC_Deps\\DI\\Factory\\RequestedEntry' not found in wp-content/plugins/quote-requests-for-woocommerce/dependencies/dependency-injection/php-di/php-di/src/Definition/Definition.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'DWS_QRWC_Deps\\DI\\Definition\\Source\\DefinitionSource' not found in wp-content/plugins/quote-requests-for-woocommerce/dependencies/dependency-injection/php-di/php-di/src/Definition/Source/AnnotationBasedAutowiring.php:32
    • > PHP Fatal error
      Uncaught Error: Interface 'DWS_QRWC_Deps\\Invoker\\ParameterResolver\\ParameterResolver' not found in wp-content/plugins/quote-requests-for-woocommerce/dependencies/dependency-injection/php-di/php-di/src/Invoker/FactoryParameterResolver.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: proposals, bids, estimates, requests, woocommerce...

quote-requests-for-woocommerce/quote-requests-for-woocommerce.php Passed 13 tests

The principal PHP file in "Quote Requests for WooCommerce" v. 1.0.4 is loaded by WordPress automatically on each request
125 characters long description:
A WooCommerce extension for allowing customers to submit quote requests to get customized prices before placing their orders.

Code Analysis 97% from 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 detected53,368 lines of code in 644 files:
LanguageFilesBlank linesComment linesLines of code
PHP6039,83237,39951,605
PO File1443589976
JavaScript134572298
CSS162121160
Sass2210141
TypeScript6245293
JSON10048
SVG11030
Markdown14017

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 2,911)
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity14.79
▷ Minimum class complexity1.00
▷ Maximum class complexity2,911.00
Average method complexity3.42
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces110
Interfaces81
Traits98
Classes293
▷ Abstract classes4113.99%
▷ Concrete classes25286.01%
▷ Final classes239.13%
Methods2,818
▷ Static methods32911.67%
▷ Public methods2,23579.31%
▷ Protected methods2007.10%
▷ Private methods38313.59%
Functions323
▷ Named functions23572.76%
▷ Anonymous functions8827.24%
Constants224
▷ Global constants16071.43%
▷ Class constants6428.57%
▷ Public constants6296.88%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/freemius/wordpress-sdk/assets/img/quote-requests-for-woocommerce.png11.48KB4.65KB▼ 59.48%
vendor/freemius/wordpress-sdk/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
vendor/freemius/wordpress-sdk/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%