78% contact-from-product-tab-woocommerce

Code Review | Contact Form in Product Tab WooCommerce by Themeqx.com

WordPress plugin Contact Form in Product Tab WooCommerce by Themeqx.com scored78%from 54 tests.

About plugin

  • Plugin page: contact-from-prod...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: May 2, 2017
  • Latest release: Jul 5, 2018
  • Number of updates: 9
  • Update frequency: every 47.7 days
  • Top authors: themeqx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,023 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼8.17ms] Passed 4 tests

Analyzing server-side resources used by Contact Form in Product Tab WooCommerce by Themeqx.com
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0941.70 ▲3.02
Dashboard /wp-admin3.40 ▲0.0545.60 ▼16.77
Posts /wp-admin/edit.php3.51 ▲0.1550.82 ▼2.57
Add New Post /wp-admin/post-new.php6.00 ▲0.1187.51 ▼14.45
Media Library /wp-admin/upload.php3.32 ▲0.0936.41 ▲1.10
CFPTWC /wp-admin/edit.php?post_type=cfptwc_msgs3.3637.22
Add New /wp-admin/post-new.php?post_type=cfptwc_msgs3.3641.08
CFPTWC Settings /wp-admin/edit.php?post_type=cfptwc_msgs&page=cfptwc3.3533.08

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 8 new options
New WordPress options
themeqx_cfptwc_option
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
themeqx_cfptwc_version
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Contact Form in Product Tab WooCommerce by Themeqx.com
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,924 ▲17813.64 ▼0.645.99 ▲4.4743.51 ▼1.98
Dashboard /wp-admin2,243 ▲554.92 ▼0.9698.24 ▲0.0238.13 ▼2.22
Posts /wp-admin/edit.php2,129 ▲402.07 ▲0.0140.88 ▲0.2233.74 ▼0.40
Add New Post /wp-admin/post-new.php1,546 ▲2223.07 ▼0.07676.86 ▲67.4552.79 ▼1.32
Media Library /wp-admin/upload.php1,425 ▲404.23 ▼0.0296.12 ▼0.6240.73 ▼1.14
CFPTWC /wp-admin/edit.php?post_type=cfptwc_msgs1,0872.0033.9529.50
Add New /wp-admin/post-new.php?post_type=cfptwc_msgs1,5652.6150.1458.83
CFPTWC Settings /wp-admin/edit.php?post_type=cfptwc_msgs&page=cfptwc1,2691.9931.0546.27

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

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/contact-from-product-tab-woocommerce/admin/view/themeqx_promotions.php
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant CFPTWC_DIR - assumed 'CFPTWC_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/contact-from-product-tab-woocommerce/views/contact_msgs_view_meta_box.php on line 4
    • > PHP Warning
      include(CFPTWC_DIR/admin/view/themeqx_promotions.php): failed to open stream: No such file or directory in wp-content/plugins/contact-from-product-tab-woocommerce/views/contact_msgs_view_meta_box.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_cfptwc_option() in wp-content/plugins/contact-from-product-tab-woocommerce/views/emails/response_email_after_contact.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_cfptwc_option() in wp-content/plugins/contact-from-product-tab-woocommerce/views/emails/admin_email_notification.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/contact-from-product-tab-woocommerce/views/contact_msgs_view_meta_box.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/contact-from-product-tab-woocommerce/admin/view/edit_custom_field.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/contact-from-product-tab-woocommerce/contact-from-product-tab-woocommerce.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_permalink() in wp-content/plugins/contact-from-product-tab-woocommerce/views/themeqx_cfptwc_tab.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function maybe_unserialize() in wp-content/plugins/contact-from-product-tab-woocommerce/admin/view/settings_general_tab.php:4
    • > PHP Warning
      include(): Failed opening 'CFPTWC_DIR/admin/view/themeqx_promotions.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/contact-from-product-tab-woocommerce/views/contact_msgs_view_meta_box.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: message, woocommerce, form, communication, contact...

contact-from-product-tab-woocommerce/contact-from-product-tab-woocommerce.php 92% from 13 tests

This is the main PHP file of "Contact Form in Product Tab WooCommerce by Themeqx.com" version 2.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.0.1" instead of "4.0")

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
Everything looks great! No dangerous files found in this plugin939 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12224106821
JavaScript28655
Markdown121032
CSS10031

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity5.67
▷ Minimum class complexity2.00
▷ Maximum class complexity12.00
Average method complexity1.74
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods19
▷ Static methods315.79%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
There were not PNG files found in your plugin