78% contact-form-7-ui

Code Review | Contact Form 7 UI

WordPress plugin Contact Form 7 UI scored 78% from 54 tests.

About plugin

  • Plugin page: contact-form-7-ui
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-3.6.1
  • WordPress version: 6.3.1
  • First release: Sep 25, 2013
  • Latest release: Sep 25, 2013
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: lordspace (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,046 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼1.43ms] Passed 4 tests

Server-side resources used by Contact Form 7 UI
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0939.13 ▼3.56
Dashboard /wp-admin3.41 ▲0.1045.79 ▼1.38
Posts /wp-admin/edit.php3.52 ▲0.1646.00 ▼1.22
Add New Post /wp-admin/post-new.php5.99 ▲0.1093.76 ▲0.44
Media Library /wp-admin/upload.php3.33 ▲0.1036.02 ▲0.97
Contact Form 7 UI /wp-admin/options-general.php?page=contact-form-7-ui/contact-form-7-ui.php3.3333.00

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Contact Form 7 UI
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,927 ▲19213.57 ▼0.825.42 ▲3.6543.78 ▲1.00
Dashboard /wp-admin2,232 ▲475.85 ▼0.00101.74 ▼15.0940.13 ▼6.75
Posts /wp-admin/edit.php2,114 ▲251.99 ▼0.0338.65 ▲1.6034.91 ▼0.25
Add New Post /wp-admin/post-new.php1,564 ▲3123.11 ▲0.28574.99 ▼87.2759.99 ▲6.42
Media Library /wp-admin/upload.php1,414 ▲324.19 ▼0.0196.48 ▼3.2542.75 ▼5.25
Contact Form 7 UI /wp-admin/options-general.php?page=contact-form-7-ui/contact-form-7-ui.php2,06814.44325.91100.70

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/contact-form-7-ui/contact-form-7-ui.php
    • > /wp-content/plugins/contact-form-7-ui/zzz_contact_form.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=contact-form-7-ui/contact-form-7-ui.php
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/options-general.php?page=contact-form-7-ui/contact-form-7-ui.php
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.
    • > GET request to /wp-admin/options-general.php?page=contact-form-7-ui/contact-form-7-ui.php
    • > Deprecation (warning) in unknown
    https://static.xx.fbcdn.net/rsrc.php/v3/ys/r/uroBBE-t04u.js?_nc_x=Ij3Wp8lg5Kz 271 Listener added for a synchronous 'DOMSubtreeModified' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.
    • > GET request to /wp-admin/options-general.php?page=contact-form-7-ui/contact-form-7-ui.php
    • > Console-api (severe) in unknown
    https://static.xx.fbcdn.net/rsrc.php/v3/ys/r/uroBBE-t04u.js?_nc_x=Ij3Wp8lg5Kz 60:573 "ErrorUtils caught an error:\n\nCannot listen to an undefined element. [Caught in: Tried to listen to element of type click]\n\nSubsequent non-fatal errors won't be logged; see https://fburl.com/debugjs."

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Plugin dashboard icon), #2 (Plugin UI for entering product details)
  • Tags: Please reduce the number of tags, currently 25 tag instead of maximum 10
Please take inspiration from this readme.txt

contact-form-7-ui/contact-form-7-ui.php 92% from 13 tests

"Contact Form 7 UI" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 277 characters long)

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
Good job! No executable or dangerous file extensions detected876 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP3192167687
HTML22316122
JavaScript262036
XML20019
CSS15712

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity20.50
▷ Minimum class complexity20.00
▷ Maximum class complexity21.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods27
▷ Static methods933.33%
▷ Public methods27100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png15.30KB6.65KB▼ 56.51%
zzz_media/qr_code.png0.39KB0.41KB0.00%
screenshot-2.png21.66KB10.67KB▼ 50.75%
tinymce/icon.png0.40KB0.43KB0.00%