68% cf7-grid-and-styler-for-divi

Code Review | Grid & Styler For Contact Form 7 And Divi

WordPress plugin Grid & Styler For Contact Form 7 And Divi scored68%from 54 tests.

About plugin

  • Plugin page: cf7-grid-and-styl...
  • Plugin version: 1.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.3
  • WordPress version: 6.3.1
  • First release: Mar 30, 2020
  • Latest release: Aug 24, 2023
  • Number of updates: 14
  • Update frequency: every 89.1 days
  • Top authors: wpt00ls (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /2,769 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲5.01MB] [CPU: ▲20.41ms] 75% from 4 tests

This is a short check of server-side resources used by Grid & Styler For Contact Form 7 And Divi
Please take the time to fix the following items
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 5.01MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /8.88 ▲5.4265.15 ▲27.10
Dashboard /wp-admin8.90 ▲5.5673.25 ▲10.68
Posts /wp-admin/edit.php8.91 ▲5.5480.00 ▲34.11
Add New Post /wp-admin/post-new.php9.41 ▲3.52110.53 ▲13.55
Media Library /wp-admin/upload.php8.91 ▲5.6763.75 ▲30.32
Contact Form 7 For Divi /wp-admin/admin.php?page=cf7-grid-and-styler-for-divi8.9160.26
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius8.9157.66

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 254 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
fs_debug_mode
theysaidso_admin_options
fs_accounts
fs_active_plugins

Browser metrics Passed 4 tests

An overview of browser requirements for Grid & Styler For Contact Form 7 And Divi
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6214.72 ▲0.351.49 ▼0.2328.69 ▼17.41
Dashboard /wp-admin2,211 ▲345.66 ▲0.1094.72 ▲6.1645.07 ▲5.89
Posts /wp-admin/edit.php2,120 ▲232.02 ▲0.0840.44 ▲4.2639.35 ▲3.28
Add New Post /wp-admin/post-new.php1,543 ▲1223.21 ▲0.02665.99 ▲60.3859.24 ▲8.99
Media Library /wp-admin/upload.php1,419 ▲254.19 ▲0.0196.88 ▲2.9143.20 ▲2.59
Contact Form 7 For Divi /wp-admin/admin.php?page=cf7-grid-and-styler-for-divi9781.7128.2157.11
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0842.2123.3328.88

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/cf7-grid-and-styler-for-divi/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • fs_accounts
    • fs_active_plugins
    • widget_recent-posts
    • fs_debug_mode

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/cf7-grid-and-styler-for-divi/resources/views/admin_menu/sub_menu.php
  • 34× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerInterface' not found in wp-content/plugins/cf7-grid-and-styler-for-divi/vendor/pimple/pimple/src/Pimple/Psr11/Container.php:37
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\\ContainerExceptionInterface' not found in wp-content/plugins/cf7-grid-and-styler-for-divi/vendor/pimple/pimple/src/Pimple/Exception/ExpectedInvokableException.php:36
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/cf7-grid-and-styler-for-divi/resources/views/shortcodes/one_third.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_shortcode() in wp-content/plugins/cf7-grid-and-styler-for-divi/resources/views/shortcodes/two_third.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'DiviExtension' not found in wp-content/plugins/cf7-grid-and-styler-for-divi/includes/WptCf7Divi.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/cf7-grid-and-styler-for-divi/includes/modules/WptContactForm7/WptContactForm7.php:3
    • > PHP Notice
      Undefined variable: attrs in wp-content/plugins/cf7-grid-and-styler-for-divi/resources/views/divi/cf7.php on line 1
    • > PHP Notice
      Undefined variable: attrs in wp-content/plugins/cf7-grid-and-styler-for-divi/resources/views/shortcodes/one_third.php on line 1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/cf7-grid-and-styler-for-divi/resources/views/shortcodes/one_half.php on line 1
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Container\otFoundExceptionInterface' not found in wp-content/plugins/cf7-grid-and-styler-for-divi/vendor/pimple/pimple/src/Pimple/Exception/InvalidServiceIdentifierException.php:36

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)
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 19 tag instead of maximum 10
The official readme.txt is a good inspiration

cf7-grid-and-styler-for-divi/cf7-grid-and-styler-for-divi.php Passed 13 tests

Analyzing the main PHP file in "Grid & Styler For Contact Form 7 And Divi" version 1.5.2
45 characters long description:
Grid Builder & Divi Styler for Contact Form 7

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected35,634 lines of code in 201 files:
LanguageFilesBlank linesComment linesLines of code
PHP1678,39318,28135,019
JavaScript104969280
JSON300165
reStructuredText19413597
YAML15035
CSS170017
XML11013
Markdown1508

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity58.36
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.42
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces11
Interfaces4
Traits0
Classes77
▷ Abstract classes22.60%
▷ Concrete classes7597.40%
▷ Final classes22.67%
Methods1,393
▷ Static methods21615.51%
▷ Public methods1,00271.93%
▷ Protected methods171.22%
▷ Private methods37426.85%
Functions116
▷ Named functions10187.07%
▷ Anonymous functions1512.93%
Constants145
▷ Global constants9867.59%
▷ Class constants4732.41%
▷ 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
3 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/cf7-grid-and-styler-for-divi.png13.87KB5.76KB▼ 58.49%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%