78% product-dropdown-for-contact-form-7

Code Review | Product Dropdown For Contact Form 7

WordPress plugin Product Dropdown For Contact Form 7 scored78%from 54 tests.

About plugin

  • Plugin page: product-dropdown-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.2.2
  • WordPress version: 6.3.1
  • First release: Aug 25, 2022
  • Latest release: Jul 3, 2023
  • Number of updates: 6
  • Update frequency: every 52.0 days
  • Top authors: howdytheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /330 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.45ms] Passed 4 tests

An overview of server-side resources used by Product Dropdown For Contact Form 7
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0439.99 ▼3.85
Dashboard /wp-admin3.35 ▲0.0544.72 ▼7.89
Posts /wp-admin/edit.php3.40 ▲0.0449.53 ▲4.55
Add New Post /wp-admin/post-new.php5.95 ▲0.0694.23 ▼5.94
Media Library /wp-admin/upload.php3.27 ▲0.0433.18 ▼0.11

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Product Dropdown For Contact Form 7
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲8313.61 ▼0.761.71 ▼0.7138.09 ▼10.19
Dashboard /wp-admin2,228 ▲284.86 ▼1.05110.82 ▼20.6242.32 ▼3.31
Posts /wp-admin/edit.php2,104 ▲42.02 ▼0.0839.54 ▲2.3837.01 ▲0.32
Add New Post /wp-admin/post-new.php1,539 ▲1318.46 ▲0.94611.15 ▼79.6160.31 ▼3.71
Media Library /wp-admin/upload.php1,404 ▲44.14 ▼0.15106.32 ▼0.8141.18 ▼1.16

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/product-dropdown-for-contact-form-7/product-dropdown-for-contact-form-7.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-dropdown-for-contact-form-7/inc/tag.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-dropdown-for-contact-form-7/inc/form-tag.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 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
These attributes need your attention: You can look at the official readme.txt

product-dropdown-for-contact-form-7/product-dropdown-for-contact-form-7.php Passed 13 tests

The main PHP file in "Product Dropdown For Contact Form 7" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
34 characters long description:
WooCommerce Product Dropdown List.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin234 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP44211215
JavaScript12115
CSS1004

PHP code Passed 2 tests

A brief analysis 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.18
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
Namespaces0
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin