67% cf7-styler

Code Review | Design for Contact Form 7 Style WordPress Plugin - CF7 WOW Styler

WordPress plugin Design for Contact Form 7 Style WordPress Plugin - CF7 WOW Styler scored67%from 54 tests.

About plugin

  • Plugin page: cf7-styler
  • Plugin version: 1.6.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Nov 5, 2019
  • Latest release: Nov 23, 2023
  • Number of updates: 246
  • Update frequency: every 6.0 days
  • Top authors: Tobias_Conrad (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

4,000+ active /51,101 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲5.53MB] [CPU: ▲35.24ms] 75% from 4 tests

This is a short check of server-side resources used by Design for Contact Form 7 Style WordPress Plugin - CF7 WOW Styler
Please take the time to fix the following items
  • Extra RAM: Extra memory usage should kept under 5MB (currently 5.53MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.26 ▲5.8073.99 ▲34.43
Dashboard /wp-admin9.28 ▲5.9888.43 ▲37.81
Posts /wp-admin/edit.php9.28 ▲5.9290.15 ▲37.42
Add New Post /wp-admin/post-new.php10.33 ▲4.44124.69 ▲31.28
Media Library /wp-admin/upload.php9.28 ▲6.0585.58 ▲48.10
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius9.2879.52

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 320 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-posts
can_compress_scripts
fs_active_plugins
widget_recent-comments
theysaidso_admin_options
fs_debug_mode
cf7cstmzr_style_schemes
widget_theysaidso_widget
fs_accounts
db_upgraded

Browser metrics Passed 4 tests

Design for Contact Form 7 Style WordPress Plugin - CF7 WOW Styler: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲15213.33 ▼1.018.23 ▲6.6229.00 ▼14.74
Dashboard /wp-admin2,227 ▲465.49 ▼0.2296.32 ▼13.9248.26 ▲3.51
Posts /wp-admin/edit.php2,142 ▲422.15 ▲0.2041.46 ▼0.2738.97 ▲6.23
Add New Post /wp-admin/post-new.php1,550 ▲2423.38 ▲0.28700.54 ▲31.3148.43 ▼9.36
Media Library /wp-admin/upload.php1,438 ▲474.10 ▼0.09113.19 ▲4.3050.39 ▲4.25
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,0961.6529.5131.60

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/cf7-styler/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 10 options in the database
    • theysaidso_admin_options
    • fs_accounts
    • fs_debug_mode
    • widget_recent-comments
    • cf7cstmzr_style_schemes
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • fs_active_plugins
    • widget_recent-posts

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/cf7-styler/admin/partials/tutorials/tutorials-en.php
    • > /wp-content/plugins/cf7-styler/admin/partials/tutorials/welcome-de.php
    • > /wp-content/plugins/cf7-styler/admin/partials/tutorials/welcome-en.php
    • > /wp-content/plugins/cf7-styler/admin/partials/tutorials/tutorials-de.php
    • > /wp-content/plugins/cf7-styler/public/partials/cf7-customizer-public-display.php
  • 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/cf7-styler/admin/partials/cf7-customizer-admin-tabs.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cf7-styler/admin/partials/cf7-customizer-admin-tab-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/cf7-styler/includes/lib/Cf7_Required_Plugin.php:117
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/class-wp-upgrader-skin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/cf7-styler/includes/lib/Cf7_Required_Plugin.php on line 114
    • > PHP Fatal error
      Uncaught Error: Class 'Cf7_License' not found in wp-content/plugins/cf7-styler/admin/partials/cf7-customizer-admin-display.php:15
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/class-wp-upgrader-skin.php): failed to open stream: No such file or directory in wp-content/plugins/cf7-styler/includes/lib/Cf7_Required_Plugin.php on line 114
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/cf7-styler/includes/lib/Cf7_Required_Plugin.php on line 114
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_user_locale() in wp-content/plugins/cf7-styler/admin/partials/cf7-customizer-admin-tutorial.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function delete_option() in wp-content/plugins/cf7-styler/admin/partials/cf7-customizer-admin-tab-form-customize.php:51
    • > PHP Fatal error
      Uncaught Error: Class 'Cf7_Required_Plugin' not found in wp-content/plugins/cf7-styler/admin/partials/cf7-customizer-admin-tab-required-plugin.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: contact form 7 style, contact form 7, contactform7, design, cf7

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

"Design for Contact Form 7 Style WordPress Plugin - CF7 WOW Styler" version 1.6.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 146 characters long)

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin63,231 lines of code in 239 files:
LanguageFilesBlank linesComment linesLines of code
PHP1458,86417,96737,327
JavaScript342,6542,27915,905
PO File122,2683,3036,612
Markdown1053901,405
CSS22116431,222
HTML3130426
JSON1000266
TypeScript1232845
YAML16122
SVG1001

PHP code 0% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,096)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 140)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity77.06
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity4.78
▷ Minimum method complexity1.00
▷ Maximum method complexity140.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes65
▷ Abstract classes23.08%
▷ Concrete classes6396.92%
▷ Final classes00.00%
Methods1,355
▷ Static methods22616.68%
▷ Public methods95070.11%
▷ Protected methods171.25%
▷ Private methods38828.63%
Functions112
▷ Named functions112100.00%
▷ Anonymous functions00.00%
Constants151
▷ Global constants10468.87%
▷ Class constants4731.13%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
8 PNG files occupy 0.17MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/vendors/split/packages/splitjs/test/lib/jasmine-2.6.4/jasmine_favicon.png1.45KB1.48KB0.00%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
public/vendors/split/packages/splitjs/grips/vertical.png0.09KB0.10KB0.00%
freemius/assets/img/plugin-icon.png26.16KB5.41KB▼ 79.34%
public/vendors/vertical.png0.09KB0.10KB0.00%