89% product-faq

Code Review | Product FAQ for Woocommerce

WordPress plugin Product FAQ for Woocommerce scored 89% from 54 tests.

About plugin

  • Plugin page: product-faq
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.3
  • WordPress version: 6.3.1
  • First release: Jun 26, 2020
  • Latest release: Aug 7, 2023
  • Number of updates: 11
  • Update frequency: every 103.5 days
  • Top authors: Wpcalc (90.91%)lobov (18.18%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 580 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.07MB] [CPU: ▼6.14ms] Passed 4 tests

An overview of server-side resources used by Product FAQ for Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0738.01 ▼1.59
Dashboard /wp-admin3.37 ▲0.0647.79 ▲0.01
Posts /wp-admin/edit.php3.48 ▲0.1248.93 ▼1.76
Add New Post /wp-admin/post-new.php5.95 ▲0.0689.09 ▼21.20
Media Library /wp-admin/upload.php3.29 ▲0.0640.99 ▲5.60

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Product FAQ for Woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲15513.55 ▼1.115.49 ▲3.7338.66 ▼2.68
Dashboard /wp-admin2,213 ▲254.87 ▲0.01102.09 ▼4.5738.55 ▼1.50
Posts /wp-admin/edit.php2,086 ▼62.01 ▼0.0435.91 ▼4.5632.87 ▼2.87
Add New Post /wp-admin/post-new.php1,533 ▲1923.29 ▲5.75677.50 ▲79.7955.41 ▼6.02
Media Library /wp-admin/upload.php1,395 ▲44.23 ▲0.0792.92 ▼4.1041.76 ▼6.34

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however 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 just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Backend), #2 (Frontend)
The official readme.txt might help

product-faq/woo-product-faq.php 85% from 13 tests

The main file in "Product FAQ for Woocommerce" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("product-faq.php" instead of "woo-product-faq.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin413 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP3100102240
CSS44284
Sass14053
JavaScript45136

PHP code Passed 2 tests

Analyzing 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.32
Average class complexity10.33
▷ Minimum class complexity3.00
▷ Maximum class complexity16.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods16
▷ Static methods212.50%
▷ Public methods1487.50%
▷ Protected methods00.00%
▷ Private methods212.50%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.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
2 PNG files occupy 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png20.24KB5.21KB▼ 74.24%
screenshot-2.png22.44KB6.46KB▼ 71.21%