10% fs-product-inquiry

Code Review | FS Product Inquiry

WordPress plugin FS Product Inquiry scored10%from 54 tests.

About plugin

  • Plugin page: fs-product-inquiry
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.5
  • WordPress version: 6.3.1
  • First release: Oct 15, 2020
  • Latest release: Apr 12, 2021
  • Number of updates: 6
  • Update frequency: every 29.8 days
  • Top authors: fudugo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /396 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • The plugin cannot be installed
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▲0.26MB] [CPU: ▼2.09ms] Passed 4 tests

Server-side resources used by FS Product Inquiry
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2744.03 ▼0.02
Dashboard /wp-admin3.56 ▲0.2650.30 ▲1.92
Posts /wp-admin/edit.php3.68 ▲0.3244.41 ▼1.82
Add New Post /wp-admin/post-new.php6.15 ▲0.2691.53 ▼8.43
Media Library /wp-admin/upload.php3.49 ▲0.2638.75 ▲2.22
FS Inquiries /wp-admin/edit.php?post_type=fspi-inquiry3.5338.07
FS Product /wp-admin/edit.php?post_type=fspi-products3.5336.39
Attributes /wp-admin/edit-tags.php?taxonomy=attributes&post_type=fspi-products3.4835.50
FS Settings /wp-admin/options-general.php?page=fspi-setting3.4633.53
Category /wp-admin/edit-tags.php?taxonomy=fspi-category&post_type=fspi-products3.4832.12
Add New Product /wp-admin/post-new.php?post_type=fspi-products3.6952.99

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 55 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
_fspi_inquiry_form_fields
can_compress_scripts
_fspi_server_url
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

FS Product Inquiry: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲12014.45 ▼0.071.81 ▼0.0143.13 ▲0.76
Dashboard /wp-admin2,269 ▲815.86 ▲0.01103.45 ▼17.0938.07 ▼8.77
Posts /wp-admin/edit.php2,152 ▲632.07 ▲0.0734.75 ▼3.5535.45 ▲3.09
Add New Post /wp-admin/post-new.php1,590 ▲7623.33 ▲5.63619.81 ▼75.0364.02 ▲0.36
Media Library /wp-admin/upload.php1,448 ▲604.24 ▲0.0295.04 ▼12.9341.34 ▼7.75
FS Inquiries /wp-admin/edit.php?post_type=fspi-inquiry1,1131.9429.5029.14
FS Product /wp-admin/edit.php?post_type=fspi-products1,1502.0031.5132.34
Attributes /wp-admin/edit-tags.php?taxonomy=attributes&post_type=fspi-products1,3212.1426.5928.48
FS Settings /wp-admin/options-general.php?page=fspi-setting1,4491.7526.5338.58
Category /wp-admin/edit-tags.php?taxonomy=fspi-category&post_type=fspi-products1,3252.2734.5233.55
Add New Product /wp-admin/post-new.php?post_type=fspi-products2,7187.94169.6463.64

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 8 options in the database
    • _fspi_server_url
    • _fspi_inquiry_form_fields
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Admin General Settings), #2 (Inquiry form settings), #3 (Email Settings), #4 (Licence Settings), #5 (Product Inquiry Page), #6 (Inquiry Popup)
You can take inspiration from this readme.txt

fs-product-inquiry/fs-product-inquiry.php 92% from 13 tests

The principal PHP file in "FS Product Inquiry" v. 1.1.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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
Success! There were no dangerous files found in this plugin24,271 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
CSS121,5336513,725
JavaScript72,0351,6958,840
PHP211632271,706

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity16.75
▷ Minimum class complexity1.00
▷ Maximum class complexity55.00
Average method complexity3.62
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes225.00%
Methods48
▷ Static methods12.08%
▷ Public methods48100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
2 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/public/img/box.png12.45KB9.83KB▼ 21.05%
assets/public/img/product.png6.76KB6.08KB▼ 10.05%