89% product-questions-answers-for-woocommerce

Code Review | Product Questions & Answers for WooCommerce

WordPress plugin Product Questions & Answers for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: product-questions...
  • Plugin version: 1.2.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Jul 3, 2019
  • Latest release: Oct 9, 2023
  • Number of updates: 19
  • Update frequency: every 82.1 days
  • Top authors: expresstechsoftware (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active /4,707 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
Install script ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼7.35ms] Passed 4 tests

This is a short check of server-side resources used by Product Questions & Answers for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1942.77 ▼0.36
Dashboard /wp-admin3.49 ▲0.1448.68 ▼18.98
Posts /wp-admin/edit.php3.60 ▲0.2546.58 ▼1.89
Add New Post /wp-admin/post-new.php6.07 ▲0.1886.21 ▼7.44
Media Library /wp-admin/upload.php3.41 ▲0.1835.07 ▼1.07

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Product Questions & Answers for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲11813.43 ▼0.939.21 ▲7.2640.46 ▼1.57
Dashboard /wp-admin2,200 ▲255.49 ▼0.2387.08 ▼20.2245.69 ▲2.34
Posts /wp-admin/edit.php2,118 ▲152.07 ▲0.1236.97 ▼6.6634.40 ▼2.54
Add New Post /wp-admin/post-new.php1,538 ▲1022.99 ▲0.17716.79 ▲47.3052.18 ▼18.68
Media Library /wp-admin/upload.php1,417 ▲204.21 ▼0.00103.46 ▼4.0342.79 ▼2.91

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

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

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: discussions, woocommerce, answers, forum, e-commerce...

product-questions-answers-for-woocommerce/ets_question_answer.php 77% from 13 tests

The entry point to "Product Questions & Answers for WooCommerce" version 1.2.4 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("product-questions-answers-for-woocommerce.php" instead of "ets_question_answer.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Description: Keep the plugin description shorter than 140 characters (currently 271 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin1,319 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP3202102939
CSS171264
JavaScript280116

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity42.67
▷ Minimum class complexity2.00
▷ Maximum class complexity82.00
Average method complexity4.91
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
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
asset/images/delet.png3.15KB2.23KB▼ 29.38%
asset/images/Cursor-Move.png1.33KB0.17KB▼ 86.89%
asset/images/C1.png0.13KB0.11KB▼ 20.59%