84% request-for-quotation

Code Review | RFQWP Form

WordPress plugin RFQWP Form scored84%from 54 tests.

About plugin

  • Plugin page: request-for-quota...
  • Plugin version: 1.2.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7.1
  • WordPress version: 6.3.1
  • First release: Sep 14, 2020
  • Latest release: Apr 28, 2021
  • Number of updates: 9
  • Update frequency: every 26.2 days
  • Top authors: nyiprekettye (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,768 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.65MB] [CPU: ▼17.77ms] Passed 4 tests

Server-side resources used by RFQWP Form
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.11 ▲0.49
Dashboard /wp-admin3.34 ▲0.0447.72 ▼9.34
Posts /wp-admin/edit.php3.45 ▲0.1048.41 ▼0.12
Add New Post /wp-admin/post-new.php3.21 ▼2.6738.62 ▼62.09
Media Library /wp-admin/upload.php3.26 ▲0.0341.34 ▲2.39
Email /wp-admin/admin.php?page=rfqwp-email3.2032.64
Forms /wp-admin/admin.php?page=rfqwp-form3.2032.86

Server storage [IO: ▲3.60MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 53 new files
Database: 7 new tables, 6 new options
New tables
wp_rfqwp_form_question_item
wp_rfqwp_form
wp_rfqwp_form_card
wp_rfqwp_form_system_email
wp_rfqwp_form_column
wp_rfqwp_user_email
wp_rfqwp_form_question
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for RFQWP Form
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲5313.20 ▼1.121.73 ▼0.8143.15 ▼3.51
Dashboard /wp-admin2,228 ▲405.86 ▲0.07104.59 ▼13.0876.20 ▲34.36
Posts /wp-admin/edit.php2,111 ▲192.00 ▼0.0538.38 ▲2.7536.08 ▲2.73
Add New Post /wp-admin/post-new.php1,533 ▼122.69 ▼0.56618.57 ▼46.1961.91 ▲4.35
Media Library /wp-admin/upload.php1,404 ▲164.12 ▼0.09102.93 ▼1.9068.09 ▲21.94
Email /wp-admin/admin.php?page=rfqwp-email1,31613.08191.3385.02
Forms /wp-admin/admin.php?page=rfqwp-form1,03212.19123.9640.80

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=rfqwp-form
    • > User notice in wp-includes/functions.php+5905
    Function wp_add_inline_script was called incorrectly. Do not pass <script> tags to wp_add_inline_script(). Please see Debugging in WordPress for more information. (This message was added in version 4.5.0.)
    • > GET request to /wp-admin/admin.php?page=rfqwp-email
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/request-for-quotation/admin/class-rfqwp-mail.php+42
    Undefined index: selectedFormConfiguration

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
You can take inspiration from this readme.txt

request-for-quotation/request-for-quotation.php Passed 13 tests

The primary PHP file in "RFQWP Form" version 1.2.2 is used by WordPress to initiate all plugin functionality
28 characters long description:
This is a custom form plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin3,073 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP232721142,504
JSON300555
CSS201010
JavaScript4004

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity13.05
▷ Minimum class complexity1.00
▷ Maximum class complexity134.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity95.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods109
▷ Static methods21.83%
▷ Public methods9688.07%
▷ Protected methods00.00%
▷ Private methods1311.93%
Functions8
▷ Named functions675.00%
▷ Anonymous functions225.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/admin-icon.png7.08KB1.57KB▼ 77.86%