78% cf7-woo-product-registration

Code Review | CF7 Woo Product Registration

WordPress plugin CF7 Woo Product Registration scored78%from 54 tests.

About plugin

  • Plugin page: cf7-woo-product-r...
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.0
  • WordPress version: 6.3.1
  • First release: Jul 26, 2018
  • Latest release: May 15, 2022
  • Number of updates: 14
  • Update frequency: every 99.5 days
  • Top authors: thehowarde (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,624 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.05MB] [CPU: ▼1.10ms] Passed 4 tests

This is a short check of server-side resources used by CF7 Woo Product Registration
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0444.56 ▲0.57
Dashboard /wp-admin3.35 ▲0.0548.17 ▼2.52
Posts /wp-admin/edit.php3.46 ▲0.1150.93 ▲4.30
Add New Post /wp-admin/post-new.php5.95 ▲0.0693.69 ▼5.61
Media Library /wp-admin/upload.php3.27 ▲0.0441.53 ▲3.17
CF7 / Woo Settings /wp-admin/options-general.php?page=cf7-wc-products3.2232.78

Server storage [IO: ▲0.13MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 48 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
cf7_wc_products
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by CF7 Woo Product Registration
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲14813.51 ▼0.848.72 ▲7.0944.65 ▲0.36
Dashboard /wp-admin2,207 ▲275.64 ▼0.0190.30 ▼3.5346.60 ▲8.06
Posts /wp-admin/edit.php2,109 ▲92.00 ▲0.0141.58 ▲6.6540.48 ▲2.79
Add New Post /wp-admin/post-new.php1,534 ▲623.09 ▼0.12665.42 ▼38.9050.56 ▼0.80
Media Library /wp-admin/upload.php1,409 ▲94.23 ▲0.03105.70 ▲8.6347.46 ▲2.69
CF7 / Woo Settings /wp-admin/options-general.php?page=cf7-wc-products9122.1928.6729.41

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • cf7_wc_products
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=cf7-wc-products
    • > Notice in wp-content/plugins/cf7-woo-product-registration/admin/class-cf7-woo-products-settings.php+151
    Trying to get property 'term_id' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=cf7-wc-products
    • > Notice in wp-content/plugins/cf7-woo-product-registration/admin/class-cf7-woo-products-settings.php+151
    Trying to get property 'name' of non-object

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'YeEasyAdminNotices\\V1\oticeTestCase' not found in wp-content/plugins/cf7-woo-product-registration/vendor/admin-notices/tests/test-notices.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function YeEasyAdminNotices\\V1\\add_action() in wp-content/plugins/cf7-woo-product-registration/vendor/admin-notices/AdminNotice.php:604
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/cf7-woo-product-registration/vendor/admin-notices/tests/bootstrap.php on line 14
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/cf7-woo-product-registration/vendor/admin-notices/tests/bootstrap.php on line 14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/cf7-woo-product-registration/vendor/admin-notices/tests/NoticeTestCase.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/cf7-woo-product-registration/admin/admin-functions.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were 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
5 plugin tags: cf7, product registration form, woocommerce, rma form, contact form 7

cf7-woo-product-registration/cf7-woo-products.php 77% from 13 tests

The entry point to "CF7 Woo Product Registration" version 1.1.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Requires at least: The required version number must match the one declared in readme.txt ("4.5" instead of "3.0")
  • Main file name: The principal plugin file should be the same as the plugin slug ("cf7-woo-product-registration.php" instead of "cf7-woo-products.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin1,685 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP194397331,325
Markdown2930195
JavaScript61178
YAML17023
JSON10018
CSS13116
Sass11016
XML10014

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 complexity9.53
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity2.08
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods118
▷ Static methods119.32%
▷ Public methods9580.51%
▷ Protected methods1411.86%
▷ Private methods97.63%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants19.09%
▷ Class constants1090.91%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected