84% cf7-google-map

Code Review | Contact Form 7 extension for Google Map fields

WordPress plugin Contact Form 7 extension for Google Map fields scored 84% from 54 tests.

About plugin

  • Plugin page: cf7-google-map
  • Plugin version: 1.9.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.2.2
  • WordPress version: 6.3.1
  • First release: Feb 18, 2017
  • Latest release: Jul 11, 2023
  • Number of updates: 43
  • Update frequency: every 54.3 days
  • Top authors: aurovrata (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

1,000+ active / 27,643 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.83ms] Passed 4 tests

A check of server-side resources used by Contact Form 7 extension for Google Map fields
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.31 ▼8.35
Dashboard /wp-admin3.31 ▲0.0050.36 ▲4.49
Posts /wp-admin/edit.php3.36 ▲0.0047.53 ▼1.46
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.92 ▼7.53
Media Library /wp-admin/upload.php3.23 ▲0.0037.61 ▲2.03

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 42 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Contact Form 7 extension for Google Map fields
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.19 ▼1.501.74 ▼0.2444.36 ▼0.69
Dashboard /wp-admin2,209 ▲214.85 ▼1.11110.29 ▼1.0640.74 ▼8.80
Posts /wp-admin/edit.php2,092 ▼02.05 ▲0.0439.68 ▼1.1534.71 ▼4.22
Add New Post /wp-admin/post-new.php1,536 ▲1523.23 ▲0.03635.05 ▼12.5157.44 ▲1.56
Media Library /wp-admin/upload.php1,382 ▼64.20 ▼0.0496.92 ▼10.4142.89 ▼1.62

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/cf7-google-map/admin/partials/cf7-google-map-settings.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/cf7-google-map/admin/partials/cf7-sgui-js-helper-hooks.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/cf7-google-map/admin/partials/cf7-sgui-helper-hooks.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wpcf7_get_validation_error() in wp-content/plugins/cf7-google-map/public/partials/cf7-googlemap.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/cf7-google-map/admin/partials/cf7-tag-display.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
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
9 plugin tags: google map, geocode, location, contact form 7 extension, maps...

cf7-google-map/cf7-googlemap.php 92% from 13 tests

"Contact Form 7 extension for Google Map fields" version 1.9.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("cf7-google-map.php" instead of "cf7-googlemap.php")

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
There were no executable files found in this plugin2,231 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP191338141,004
JavaScript97497924
CSS315141
Markdown1480109
JSON20053

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity10.88
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods46
▷ Static methods613.04%
▷ Public methods4189.13%
▷ Protected methods00.00%
▷ Private methods510.87%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/red-marker.png2.18KB1.76KB▼ 19.04%