94% contact-form-7-map-field

Code Review | Contact Form 7 Map Field

WordPress plugin Contact Form 7 Map Field scored 94% from 54 tests.

About plugin

  • Plugin page: contact-form-7-ma...
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4.2
  • WordPress version: 5.8.1
  • First release: Oct 12, 2012
  • Latest release: Nov 1, 2012
  • Number of updates: 25
  • Update frequency: every 0.8 days
  • Top authors: shemesh (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active / 10,264 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Contact Form 7 Map Field
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1242.55 ▲17.69
Dashboard /wp-admin3.06 ▲0.0151.53 ▼0.67
Posts /wp-admin/edit.php3.12 ▲0.0149.99 ▼0.14
Add New Post /wp-admin/post-new.php5.42 ▼0.0198.89 ▼576.21
Media Library /wp-admin/upload.php3.01 ▲0.0136.47 ▼1.66

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Contact Form 7 Map Field
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10815.92 ▲0.3710.88 ▼4.2048.92 ▼2.53
Dashboard /wp-admin2,970 ▲396.04 ▲0.10157.18 ▼5.76128.87 ▲3.31
Posts /wp-admin/edit.php2,739 ▼02.72 ▼0.0174.85 ▲6.66102.40 ▲5.80
Add New Post /wp-admin/post-new.php1,683 ▲6818.77 ▼2.65377.25 ▲77.09113.96 ▲0.78
Media Library /wp-admin/upload.php1,807 ▼05.01 ▼0.03154.57 ▼4.48126.98 ▼11.95

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/contact-form-7-map-field/contact-form-7-map-field.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found


Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (How it looks in the form edititing.), #2 (Example of a form with map (location) input field.)
  • Tags: You are using too many tags: 19 tag instead of maximum 10
The official readme.txt is a good inspiration

contact-form-7-map-field/contact-form-7-map-field.php Passed 13 tests

This is the main PHP file of "Contact Form 7 Map Field" version 2.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
118 characters long description:
This plugin provides a new field to Contact Form 7: a map with a coordinates marker, letting the user mark a location.

Code Analysis Passed 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 plugin215 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions7100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
2 PNG files occupy 0.24MB with 0.14MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png40.20KB12.75KB▼ 68.28%
screenshot-2.png205.34KB108.50KB▼ 47.16%