10% quotation-manager

Code Review | Quotation Manager

WordPress plugin Quotation Manager scored10%from 54 tests.

About plugin

  • Plugin page: quotation-manager
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.5
  • WordPress version: 6.3.1
  • First release: Oct 3, 2020
  • Latest release: Oct 3, 2020
  • Number of updates: 4
  • Update frequency: every 3.0 days
  • Top authors: pieter91 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /499 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
These installer errors require your attention
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/quotation-manager/QuotationManager/Settings.php+94
    Invalid argument supplied for foreach()

Server metrics [RAM: ▼1.80MB] [CPU: ▼48.48ms] Passed 4 tests

A check of server-side resources used by Quotation Manager
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.19 ▼1.276.67 ▼37.98
Dashboard /wp-admin2.21 ▼1.097.92 ▼36.90
Posts /wp-admin/edit.php2.21 ▼1.158.31 ▼43.91
Add New Post /wp-admin/post-new.php2.21 ▼3.689.10 ▼75.12
Media Library /wp-admin/upload.php2.21 ▼1.028.46 ▼27.53
New quotation /wp-admin/post-new.php?post_type=qm_quotation2.218.89
Alle activiteiten /wp-admin/edit.php?post_type=qm_quotation2.218.66

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Quotation Manager: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,555 ▲82013.74 ▼0.4412.37 ▲10.5638.18 ▼6.49
Dashboard /wp-admin2,304 ▲1194.88 ▲0.01108.92 ▼8.8240.00 ▼19.07
Posts /wp-admin/edit.php2,190 ▲1012.03 ▼0.1140.41 ▲1.0332.54 ▼2.93
Add New Post /wp-admin/post-new.php6,454 ▲4,93428.87 ▲5.60847.31 ▲212.8257.67 ▼10.14
Media Library /wp-admin/upload.php1,486 ▲954.32 ▲0.1098.50 ▼1.3440.82 ▼3.62
New quotation /wp-admin/post-new.php?post_type=qm_quotation1,18911.17247.1726.46
Alle activiteiten /wp-admin/edit.php?post_type=qm_quotation1,2071.9731.4530.45

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
    • > Warning in wp-content/plugins/quotation-manager/QuotationManager/Settings.php+94
    Invalid argument supplied for foreach()
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=qm_quotation
    • > POST request to /wp-admin/admin-ajax.php
    • > Warning in wp-content/plugins/quotation-manager/QuotationManager/Settings.php+94
    Invalid argument supplied for foreach()
    • > GET request to /wp-admin/post-new.php?post_type=qm_quotation
    • > Notice in wp-content/plugins/quotation-manager/templates/admin-qm_quotation.php+4
    Undefined index: post
    • > GET request to /wp-admin/post-new.php?post_type=qm_quotation
    • > Notice in wp-content/plugins/quotation-manager/templates/admin-qm_quotation.php+21
    Undefined variable: postMeta
    • > GET request to /wp-admin/post-new.php?post_type=qm_quotation
    • > Notice in wp-content/plugins/quotation-manager/templates/admin-qm_quotation.php+22
    Undefined variable: root

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 take a closer look at the following
  • 8× PHP files output text when accessed directly:
    • > /wp-content/plugins/quotation-manager/QuotationManager/Blocks.php
    • > /wp-content/plugins/quotation-manager/templates/admin-qm_quotation.php
    • > /wp-content/plugins/quotation-manager/templates/admin-settings.php
    • > /wp-content/plugins/quotation-manager/QuotationManager/BulkActions.php
    • > /wp-content/plugins/quotation-manager/quotation-manager.php
    • > /wp-content/plugins/quotation-manager/QuotationManager/Quotation.php
    • > /wp-content/plugins/quotation-manager/QuotationManager/Settings.php
    • > /wp-content/plugins/quotation-manager/QuotationManager/QuotationManager.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/post-new.php?post_type=qm_quotation
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"quotation-manager/form\" is registered with an invalid category \"quotation-manager\".
    • > GET request to /wp-admin/post-new.php?post_type=qm_quotation
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"quotation-manager/row\" is registered with an invalid category \"quotation-manager\".
    • > GET request to /wp-admin/post-new.php?post_type=qm_quotation
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"quotation-manager/textarea\" is registered with an invalid category \"quotation-manager\".
    • > GET request to /wp-admin/post-new.php?post_type=qm_quotation
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"quotation-manager/textinput\" is registered with an invalid category \"quotation-manager\".
    • > GET request to /wp-admin/post-new.php?post_type=qm_quotation
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"quotation-manager/dateinput\" is registered with an invalid category \"quotation-manager\".
    • > GET request to /wp-admin/post-new.php?post_type=qm_quotation
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"quotation-manager/select\" is registered with an invalid category \"quotation-manager\".
    • > GET request to /wp-admin/post-new.php?post_type=qm_quotation
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"quotation-manager/checkbox\" is registered with an invalid category \"quotation-manager\".
    • > GET request to /wp-admin/post-new.php?post_type=qm_quotation
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"quotation-manager/radiobutton\" is registered with an invalid category \"quotation-manager\".
    • > GET request to /wp-admin/post-new.php?post_type=qm_quotation
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"quotation-manager/fileinput\" is registered with an invalid category \"quotation-manager\".
    • > GET request to /wp-admin/post-new.php?post_type=qm_quotation
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"quotation-manager/emailinput\" is registered with an invalid category \"quotation-manager\".
    • > GET request to /wp-admin/post-new.php?post_type=qm_quotation
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"quotation-manager/telephonenumber\" is registered with an invalid category \"quotation-manager\".
    • > GET request to /wp-admin/post-new.php?post_type=qm_quotation
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"quotation-manager/numberinput\" is registered with an invalid category \"quotation-manager\".
    • > GET request to /wp-admin/post-new.php?post_type=qm_quotation
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"quotation-manager/range\" is registered with an invalid category \"quotation-manager\".
    • > GET request to /wp-admin/post-new.php?post_type=qm_quotation
    • > Javascript (severe) in unknown
    /wp-admin/post-new.php?post_type=qm_quotation 292:12 Uncaught SyntaxError: Unexpected token ';'

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Order form frontend), #2 (Order form in the block editor)
  • Screenshots: No descriptions were found for these screenshots #0, #0 in quotation-manager/assets to your readme.txt
You can take inspiration from this readme.txt

quotation-manager/quotation-manager.php Passed 13 tests

This is the main PHP file of "Quotation Manager" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
103 characters long description:
Design a form visually, receive the data as requests for quotation and make a Woocommerce product of it

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected1,977 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP8284127841
CSS75331668
JavaScript855124236
SVG300232

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity21.60
▷ Minimum class complexity3.00
▷ Maximum class complexity51.00
Average method complexity3.24
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods46
▷ Static methods00.00%
▷ Public methods3984.78%
▷ Protected methods00.00%
▷ Private methods715.22%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/images/5455ce10c438216b70351fe4c62933e0.png0.18KB0.12KB▼ 32.24%
css/bg.png0.18KB0.12KB▼ 32.24%
js/5455ce10c438216b70351fe4c62933e0.png0.18KB0.12KB▼ 32.24%