84% product-qa-for-woocommerce

Code Review | Product QA For Woocommerce

WordPress plugin Product QA For Woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: product-qa-for-wo...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.5
  • WordPress version: 6.3.1
  • First release: Nov 27, 2016
  • Latest release: Aug 16, 2020
  • Number of updates: 11
  • Update frequency: every 123.6 days
  • Top authors: techeshta (45.45%)vishalkakadiya (45.45%)alkesh7 (27.27%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /993 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼4.84ms] Passed 4 tests

An overview of server-side resources used by Product QA For Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1039.68 ▼0.43
Dashboard /wp-admin3.40 ▲0.1048.25 ▼1.72
Posts /wp-admin/edit.php3.51 ▲0.1649.20 ▲1.41
Add New Post /wp-admin/post-new.php5.98 ▲0.0987.95 ▼15.05
Media Library /wp-admin/upload.php3.32 ▲0.0936.36 ▼2.14
Product QA /wp-admin/edit.php?post_type=wc_product_faq3.3644.82
Add New /wp-admin/post-new.php?post_type=wc_product_faq3.4650.06

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Product QA For Woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲20314.09 ▼0.296.26 ▲4.4243.38 ▼0.95
Dashboard /wp-admin2,230 ▲454.86 ▼0.94106.96 ▲5.0940.62 ▼2.95
Posts /wp-admin/edit.php2,116 ▲241.99 ▼0.0440.22 ▼4.8334.70 ▼0.14
Add New Post /wp-admin/post-new.php1,537 ▲317.72 ▼5.27659.72 ▼10.0158.31 ▲2.46
Media Library /wp-admin/upload.php1,409 ▲274.22 ▲0.05100.62 ▲4.3346.35 ▲3.66
Product QA /wp-admin/edit.php?post_type=wc_product_faq1,1301.9331.0031.80
Add New /wp-admin/post-new.php?post_type=wc_product_faq2,4387.62173.6962.22

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/product-qa-for-woocommerce/public/templates/email/question.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/product-qa-for-woocommerce/public/templates/list-questions-answers.php:15

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: product questions, product qa, woocommerce addon, product questionnaires, product answers...

product-qa-for-woocommerce/product-qa-for-woocommerce.php 92% from 13 tests

The main PHP file in "Product QA For Woocommerce" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected553 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP12146559470
CSS11753
Markdown121023
JavaScript1267

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity4.43
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.50MB with 0.33MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshots/screenshot-1.png118.29KB43.73KB▼ 63.03%
screenshots/screenshot-2.png92.39KB34.04KB▼ 63.16%
screenshots/screenshot-3.png123.67KB42.96KB▼ 65.27%
screenshots/screenshot-4.png181.37KB57.26KB▼ 68.43%