89% ni-woocommerce-product-enquiry

Code Review | Ni WooCommerce Product Enquiry

WordPress plugin Ni WooCommerce Product Enquiry scored89%from 54 tests.

About plugin

  • Plugin page: ni-woocommerce-pr...
  • Plugin version: 4.1.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4.1
  • WordPress version: 6.3.1
  • First release: Feb 3, 2016
  • Latest release: Nov 23, 2023
  • Number of updates: 65
  • Update frequency: every 43.9 days
  • Top authors: anzia (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

200+ active /24,358 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼9.63ms] Passed 4 tests

Server-side resources used by Ni WooCommerce Product Enquiry
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0124.36 ▼14.33
Dashboard /wp-admin3.36 ▲0.0544.47 ▼15.59
Posts /wp-admin/edit.php3.47 ▲0.1148.70 ▲0.88
Add New Post /wp-admin/post-new.php5.94 ▲0.0586.19 ▼9.47
Media Library /wp-admin/upload.php3.28 ▲0.0543.39 ▲8.89
Add-ons /wp-admin/admin.php?page=ni-enquiry-addon3.3333.38
Dashboard /wp-admin/admin.php?page=ni-enquiry-dashboard3.3433.41
Setting /wp-admin/admin.php?page=ni-enquiry-setting3.3140.63

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Ni WooCommerce Product Enquiry
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,497 ▼26514.20 ▼0.140.96 ▼0.7213.16 ▼31.72
Dashboard /wp-admin2,221 ▲475.54 ▼0.0497.13 ▼5.0686.40 ▲40.17
Posts /wp-admin/edit.php2,132 ▲321.96 ▼0.0535.65 ▼7.1930.58 ▼6.75
Add New Post /wp-admin/post-new.php1,701 ▲17522.04 ▼1.19751.24 ▲111.3467.27 ▲20.62
Media Library /wp-admin/upload.php1,420 ▲204.16 ▼0.0997.10 ▲2.3074.84 ▲33.02
Add-ons /wp-admin/admin.php?page=ni-enquiry-addon1,2191.8635.6890.56
Dashboard /wp-admin/admin.php?page=ni-enquiry-dashboard1,5632.0529.6457.73
Setting /wp-admin/admin.php?page=ni-enquiry-setting1,6176.76146.17128.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Product Enquiry Form.), #2 (Product Enquiry Settings.), #3 (Dashboard.), #4 (Single Product Page Enquiry button.), #5 (Whatsapp setting), #6 (Product detail with whatsapp button), #7 (Connect to whatsapp)
The official readme.txt might help

ni-woocommerce-product-enquiry/ni-woocommerce-product-enquiry.php 85% from 13 tests

"Ni WooCommerce Product Enquiry" version 4.1.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 143 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected6,490 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript41,0825233,586
CSS6921121,550
PHP6169681,223
PO File15055131

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity11.83
▷ Minimum class complexity1.00
▷ Maximum class complexity34.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods50
▷ Static methods12.00%
▷ Public methods50100.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

All PNG images should be compressed to minimize bandwidth usage for end users
9 PNG files occupy 0.28MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon2.png0.79KB0.65KB▼ 17.25%
screenshot-5.png23.36KB8.95KB▼ 61.71%
screenshot-7.png23.95KB7.95KB▼ 66.82%
screenshot-3.png8.36KB3.54KB▼ 57.66%
screenshot-4.png82.32KB37.74KB▼ 54.16%