72% contact-form-7-designer

Code Review | Contact Form 7 Designer

WordPress plugin Contact Form 7 Designer scored72%from 54 tests.

About plugin

  • Plugin page: contact-form-7-de...
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0
  • WordPress version: 6.3.1
  • First release: Feb 25, 2015
  • Latest release: Nov 28, 2022
  • Number of updates: 20
  • Update frequency: every 141.7 days
  • Top authors: tinygiantstudios (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /38,313 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲5.44MB] [CPU: ▲19.07ms] 75% from 4 tests

Analyzing server-side resources used by Contact Form 7 Designer
Please take the time to fix the following items
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 5.44MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.24 ▲5.7867.88 ▲20.57
Dashboard /wp-admin9.26 ▲5.9276.21 ▲12.17
Posts /wp-admin/edit.php9.27 ▲5.9184.20 ▲33.28
Add New Post /wp-admin/post-new.php10.05 ▲4.16111.67 ▲10.33
Media Library /wp-admin/upload.php9.27 ▲6.0472.40 ▲33.19
Freemius Debug [v.2.5.2] /wp-admin/admin.php?page=freemius9.2759.76

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 195 new files
Database: no new tables, 10 new options
New WordPress options
fs_gdpr
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
fs_accounts
widget_recent-posts
fs_debug_mode
fs_active_plugins
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Contact Form 7 Designer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,942 ▲18113.84 ▼0.518.65 ▲6.8932.22 ▼12.93
Dashboard /wp-admin2,240 ▲635.61 ▼0.0590.34 ▼5.2650.75 ▲9.25
Posts /wp-admin/edit.php2,146 ▲462.12 ▲0.1241.93 ▲3.7941.72 ▲4.89
Add New Post /wp-admin/post-new.php1,556 ▲3023.06 ▼0.61621.02 ▼74.6751.79 ▼3.75
Media Library /wp-admin/upload.php1,445 ▲454.12 ▼0.0799.94 ▼15.2345.57 ▼1.52
Freemius Debug [v.2.5.2] /wp-admin/admin.php?page=freemius1,0921.6824.8927.74

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/contact-form-7-designer/freemius/includes/class-freemius.php+8772
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 10 options
    • fs_active_plugins
    • widget_recent-comments
    • fs_accounts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • fs_gdpr
    • fs_debug_mode

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/contact-form-7-designer/admin/partials/cf7-styles-admin-display.php
    • > /wp-content/plugins/contact-form-7-designer/public/partials/cf7-styles-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #3 (A simple form in the footer of the Twenty Thirteen theme.), #4 (Add sign-up checkboxes to various places on your site.), #5 (Creating sign-up forms for your MailChimp lists is easy. The Pro version allows you to create as many form as you like.), #6 (Write your own HTML or have it generated for you. Many (optional) customization settings are availabl.), #7 (**Pro only:** Gain valuable insights which method your visitors used to subscribe for any given time period using beautiful line charts.), #8 (**Pro only:** Create your own CSS styles with the form designer in the Pro version.)
  • Tags: Too many tags (18 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

contact-form-7-designer/cf7-styles.php 77% from 13 tests

This is the main PHP file of "Contact Form 7 Designer" version 2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("contact-form-7-designer.php" instead of "cf7-styles.php")
  • Description: The description should be shorter than 140 characters (currently 156 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin34,842 lines of code in 145 files:
LanguageFilesBlank linesComment linesLines of code
PHP1258,04817,61434,584
JavaScript53898201
CSS157857

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please tend to the following items
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,089)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity84.40
▷ Minimum class complexity1.00
▷ Maximum class complexity3,089.00
Average method complexity4.54
▷ Minimum method complexity1.00
▷ Maximum method complexity89.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes53
▷ Abstract classes23.77%
▷ Concrete classes5196.23%
▷ Final classes00.00%
Methods1,278
▷ Static methods19114.95%
▷ Public methods89169.72%
▷ Protected methods171.33%
▷ Private methods37028.95%
Functions94
▷ Named functions94100.00%
▷ Anonymous functions00.00%
Constants146
▷ Global constants9967.81%
▷ Class constants4732.19%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%