84% contact-form-7-radio-field-mandatory

Code Review | Contact Form 7 Radio Field Mandatory

WordPress plugin Contact Form 7 Radio Field Mandatory scored84%from 54 tests.

About plugin

  • Plugin page: contact-form-7-ra...
  • Plugin version: 1.12
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.0
  • WordPress version: 6.3.1
  • First release: Dec 12, 2014
  • Latest release: Dec 15, 2014
  • Number of updates: 18
  • Update frequency: every 0.2 days
  • Top authors: thapa.laxman (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /2,078 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.01MB] [CPU: ▼3.93ms] Passed 4 tests

An overview of server-side resources used by Contact Form 7 Radio Field Mandatory
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.87 ▲0.29
Dashboard /wp-admin3.32 ▼0.0246.62 ▼9.54
Posts /wp-admin/edit.php3.38 ▲0.0245.78 ▲0.07
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.42 ▼6.52
Media Library /wp-admin/upload.php3.25 ▲0.0235.91 ▲5.21

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Contact Form 7 Radio Field Mandatory
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.36 ▲0.012.28 ▲0.7843.59 ▲2.21
Dashboard /wp-admin2,192 ▲155.54 ▼0.0987.71 ▲1.0840.02 ▼3.77
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0237.94 ▲2.2035.99 ▼2.28
Add New Post /wp-admin/post-new.php1,526 ▼323.01 ▼0.30679.76 ▲15.9953.35 ▲2.06
Media Library /wp-admin/upload.php1,400 ▲34.24 ▼0.03108.71 ▲9.2746.71 ▲4.74

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-7-radio-field-mandatory/functions.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
Please take inspiration from this readme.txt

contact-form-7-radio-field-mandatory/functions.php 92% from 13 tests

This is the main PHP file of "Contact Form 7 Radio Field Mandatory" version 1.12, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("contact-form-7-radio-field-mandatory.php" instead of "functions.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
No dangerous file extensions were detected97 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1343497

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin