89% map-field-for-contact-form-7

Code Review | Map Field For Contact Form 7

WordPress plugin Map Field For Contact Form 7 scored89%from 54 tests.

About plugin

  • Plugin page: map-field-for-con...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 25, 2022
  • Latest release: Jul 17, 2023
  • Number of updates: 3
  • Update frequency: every 68.7 days
  • Top authors: gravitymaster97 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /176 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: ▲0.00MB] [CPU: ▼3.22ms] Passed 4 tests

An overview of server-side resources used by Map Field For Contact Form 7
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.67 ▼5.75
Dashboard /wp-admin3.31 ▲0.0150.64 ▼1.63
Posts /wp-admin/edit.php3.36 ▲0.0049.86 ▼0.02
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.54 ▼2.65
Media Library /wp-admin/upload.php3.23 ▲0.0037.19 ▼2.84

Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please try to fix the following items
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/map-field-for-contact-form-7/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Map Field For Contact Form 7
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2913.26 ▼1.321.93 ▲0.2946.38 ▲3.13
Dashboard /wp-admin2,224 ▲214.85 ▼1.03101.74 ▼17.3338.71 ▼8.32
Posts /wp-admin/edit.php2,100 ▼02.03 ▼0.0033.94 ▼4.5934.82 ▼1.23
Add New Post /wp-admin/post-new.php1,545 ▲1223.26 ▲0.16588.54 ▼98.7553.31 ▲0.16
Media Library /wp-admin/upload.php1,397 ▼34.25 ▼0.09100.89 ▼7.3141.44 ▼5.96

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed: The official readme.txt might help

map-field-for-contact-form-7/google-map-field-for-contact-form-7.php 92% from 13 tests

Analyzing the main PHP file in "Map Field For Contact Form 7" version 1.0
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("map-field-for-contact-form-7.php" instead of "google-map-field-for-contact-form-7.php")

Code Analysis Passed 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 detected497 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP48129472
CSS10025

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity10.67
▷ Minimum class complexity2.00
▷ Maximum class complexity22.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected