83% woocommerce-product-faqs

Code Review | WooCommerce Product FAQs

WordPress plugin WooCommerce Product FAQs scored 83% from 54 tests.

About plugin

  • Plugin page: woocommerce-produ...
  • Plugin version: 3.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.7
  • WordPress version: 5.8.1
  • First release: Jul 23, 2013
  • Latest release: Sep 22, 2016
  • Number of updates: 61
  • Update frequency: every 19.0 days
  • Top authors: joshlevinson (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

300+ active / 22,239 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼138.19ms] Passed 4 tests

Server-side resources used by WooCommerce Product FAQs
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1337.27 ▲13.78
Dashboard /wp-admin3.07 ▲0.0148.64 ▲13.12
Posts /wp-admin/edit.php3.12 ▲0.0249.50 ▲3.94
Add New Post /wp-admin/post-new.php5.43 ▼0.0092.89 ▼558.56
Media Library /wp-admin/upload.php3.01 ▲0.0136.12 ▼11.26

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 1 new option
New WordPress options
woocommerce_faqs_plugin_version

Browser metrics Passed 4 tests

WooCommerce Product FAQs: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.86 ▲0.3210.86 ▲2.3351.97 ▲2.33
Dashboard /wp-admin2,967 ▲335.88 ▼0.19159.68 ▲11.49115.72 ▲5.16
Posts /wp-admin/edit.php2,739 ▼02.81 ▼0.0173.55 ▲5.1597.25 ▲4.94
Add New Post /wp-admin/post-new.php1,683 ▲1318.79 ▼0.41398.90 ▲20.11115.24 ▲7.61
Media Library /wp-admin/upload.php1,807 ▼34.99 ▼0.02159.25 ▼5.78119.08 ▲1.03

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • woocommerce_faqs_plugin_version

Smoke tests 75% from 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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/woocommerce-product-faqs/public/templates/faq-form.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_post_terms() in wp-content/plugins/woocommerce-product-faqs/public/templates/loop-faqs.php:11

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 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: frequently asked questions, woocommerce faqs, faq, woocommerce frequently asked questions, woocommerce...

woocommerce-product-faqs/woocommerce-faqs.php 77% from 13 tests

The principal PHP file in "WooCommerce Product FAQs" v. 3.0.3 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")
  • Description: The description should be shorter than 140 characters (currently 153 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("woocommerce-product-faqs.php" instead of "woocommerce-faqs.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin1,121 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP7366500951
CSS22194
JavaScript234376

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions42
▷ Named functions3890.48%
▷ Anonymous functions49.52%
Constants8
▷ Global constants8100.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
2 PNG files occupy 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/full-32x32.png23.48KB0.73KB▼ 96.88%
admin/assets/images/icon.png23.09KB0.48KB▼ 97.92%