71% cf7-customizer

Code Review | WordPress Form Customizer | CF7 Customizer

WordPress plugin WordPress Form Customizer | CF7 Customizer scored 71% from 54 tests.

About plugin

  • Plugin page: cf7-customizer
  • Plugin version: 1.6.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4.0
  • WordPress version: 5.8.1
  • First release: Sep 26, 2015
  • Latest release: Mar 7, 2020
  • Number of updates: 30
  • Update frequency: every 54.2 days
  • Top authors: mrahmadawais (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

9,000+ active / 126,142 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲5.84MB] [CPU: ▼113.70ms] 50% from 4 tests

A check of server-side resources used by WordPress Form Customizer | CF7 Customizer
The following require your attention
  • CPU: Total CPU usage should be kept under 500.00ms (currently 5,741.03ms on /wp-admin/admin.php?page=cfc_welcome_page)
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 5.84MB on /wp-admin/plugins.php?page=cfc-install-plugins)
PageMemory (MB)CPU Time (ms)
Home /8.62 ▲5.9074.92 ▲53.12
Dashboard /wp-admin8.88 ▲5.8367.97 ▲14.39
Posts /wp-admin/edit.php9.00 ▲5.9075.05 ▲26.08
Add New Post /wp-admin/post-new.php11.23 ▲5.80129.12 ▼529.23
Media Library /wp-admin/upload.php8.83 ▲5.8370.97 ▲33.95
Freemius Debug [v.2.2.4] /wp-admin/admin.php?page=freemius9.0766.83
CF7Customizer /wp-admin/admin.php?page=cfc_welcome_page9.075,741.03
Install Plugins /wp-admin/plugins.php?page=cfc-install-plugins9.0173.85

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 521 new files
Database: no new tables, 5 new options
New WordPress options
fs_debug_mode
fs_api_cache
fs_accounts
fs_gdpr
fs_active_plugins

Browser metrics Passed 4 tests

A check of browser resources used by WordPress Form Customizer | CF7 Customizer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,947 ▲35118.04 ▲2.2114.57 ▲3.7447.79 ▼5.22
Dashboard /wp-admin3,092 ▲1587.63 ▲1.54175.60 ▲22.91148.47 ▲23.33
Posts /wp-admin/edit.php2,905 ▲1663.98 ▲1.30101.38 ▲32.80110.89 ▲14.49
Add New Post /wp-admin/post-new.php1,725 ▲4224.05 ▲5.17295.70 ▼90.14111.64 ▼3.37
Media Library /wp-admin/upload.php1,895 ▲886.29 ▲1.26141.49 ▼23.77147.85 ▲25.18
Freemius Debug [v.2.2.4] /wp-admin/admin.php?page=freemius1,5673.4974.94105.77
CF7Customizer /wp-admin/admin.php?page=cfc_welcome_page1,4033.4868.61128.02
Install Plugins /wp-admin/plugins.php?page=cfc-install-plugins1,6343.5872.17115.86

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
  • Zombie WordPress options were found after uninstall: 5 options
    • fs_gdpr
    • fs_active_plugins
    • fs_debug_mode
    • fs_accounts
    • fs_api_cache

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/cf7-customizer/assets/admin/inc/sdk/freemius/templates/ajax-loader.php
  • 92× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: cfc_sec_inputs in wp-content/plugins/cf7-customizer/assets/admin/inc/options/titan-framework-options/cfc_input_margin.php on line 18
    • > PHP Notice
      Undefined variable: cfc_sec_btn in wp-content/plugins/cf7-customizer/assets/admin/inc/options/titan-framework-options/cfc_btn_bg_clr.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to a member function createOption() on null in wp-content/plugins/cf7-customizer/assets/admin/inc/options/titan-framework-options/cfc_input_font_size.php:18
    • > PHP Fatal error
      require(): Failed opening required '../../../../tests/phpunit/includes/bootstrap.php' (include_path='.:/usr/share/php') in wp-content/plugins/cf7-customizer/tests/bootstrap.php on line 22
    • > PHP Warning
      Use of undefined constant CFC_VERSION - assumed 'CFC_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/cf7-customizer/assets/admin/inc/welcome/welcome_page.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/cf7-customizer/assets/admin/inc/welcome/welcome_page.php:17
    • > PHP Fatal error
      Uncaught Error: Call to a member function createOption() on null in wp-content/plugins/cf7-customizer/assets/admin/inc/options/titan-framework-options/cfc_btn_txt_clr.php:18
    • > PHP Notice
      Undefined variable: cfc_sec_btn in wp-content/plugins/cf7-customizer/assets/admin/inc/options/titan-framework-options/cfc_btn_border.php on line 18
    • > PHP Notice
      Undefined variable: cfc_sec_btn in wp-content/plugins/cf7-customizer/assets/admin/inc/options/titan-framework-options/cfc_btn_border_clr.php on line 18
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/cf7-customizer/tests/test_wordpress_plugin_tests.php:8

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?page=cfc-install-plugins
    • > Javascript (severe) in unknown
    /wp-content/plugins/cf7-customizer/assets/admin/inc/options/titan-framework/js/min/wp-color-picker-alpha-min.js?ver=1.11 17:10 Uncaught ReferenceError: wpColorPickerL10n is not defined

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can take inspiration from this readme.txt

cf7-customizer/cf7-customizer.php 92% from 13 tests

The main file in "WordPress Form Customizer | CF7 Customizer" v. 1.6.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 185 characters long)

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin67,290 lines of code in 423 files:
LanguageFilesBlank linesComment linesLines of code
PHP2139,16120,34440,034
PO File367,2158,93517,511
JavaScript944708513,541
Sass35491773,245
Markdown845801,333
CSS181241341,099
JSON700268
Bourne Shell34136116
YAML5172291
XML42252

PHP code 0% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please tend to the following items
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 2,360)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 104)
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity40.63
▷ Minimum class complexity1.00
▷ Maximum class complexity2,360.00
Average method complexity4.19
▷ Minimum method complexity1.00
▷ Maximum method complexity104.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes134
▷ Abstract classes21.49%
▷ Concrete classes13298.51%
▷ Final classes00.00%
Methods1,698
▷ Static methods18811.07%
▷ Public methods1,16368.49%
▷ Protected methods22813.43%
▷ Private methods30718.08%
Functions137
▷ Named functions137100.00%
▷ Anonymous functions00.00%
Constants140
▷ Global constants10776.43%
▷ Class constants3323.57%
▷ Public constants33100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 0.23MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/inc/welcome/assets/img/logo_transparent.png8.58KB4.66KB▼ 45.76%
assets/admin/inc/welcome/assets/img/1.png44.92KB15.32KB▼ 65.88%
assets/admin/inc/welcome/assets/img/4.png47.80KB15.88KB▼ 66.78%
assets/admin/inc/sdk/freemius/assets/img/cf7-customizer.png9.62KB4.47KB▼ 53.54%
assets/admin/inc/welcome/assets/img/3.png48.37KB16.58KB▼ 65.73%