83% contact-form-7-tag-field

Code Review | Contact Form 7 Tag field

WordPress plugin Contact Form 7 Tag field scored83%from 54 tests.

About plugin

  • Plugin page: contact-form-7-ta...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.4.2
  • WordPress version: 6.3.1
  • First release: Sep 12, 2013
  • Latest release: Mar 12, 2016
  • Number of updates: 9
  • Update frequency: every 101.3 days
  • Top authors: Apprique (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,173 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.62ms] Passed 4 tests

An overview of server-side resources used by Contact Form 7 Tag field
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.28 ▼6.70
Dashboard /wp-admin3.33 ▲0.0343.96 ▼4.88
Posts /wp-admin/edit.php3.38 ▲0.0348.82 ▲1.14
Add New Post /wp-admin/post-new.php5.91 ▲0.0385.01 ▼12.03
Media Library /wp-admin/upload.php3.26 ▲0.0335.18 ▲1.97

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Contact Form 7 Tag field
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.33 ▼1.461.62 ▼0.1339.84 ▼8.55
Dashboard /wp-admin2,206 ▲214.85 ▼0.02103.80 ▼17.6238.87 ▼7.00
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0334.61 ▼4.4233.65 ▼0.57
Add New Post /wp-admin/post-new.php1,520 ▼1323.31 ▼0.07685.55 ▲26.8253.94 ▲8.67
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.0095.23 ▼11.1842.53 ▼3.41

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

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)
Everything seems fine, however this is by no means an exhaustive test

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-7-tag-field/tag-it.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Adding a Tag-it! field), #2 (The new Tag fields in your form)
  • Tags: Too many tags (17 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

contact-form-7-tag-field/tag-it.php 92% from 13 tests

The main PHP script in "Contact Form 7 Tag field" version 1.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("contact-form-7-tag-field.php" instead of "tag-it.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,761 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS356501,214
JavaScript293138416
PHP14757131

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin