89% autocomplete-location-field-contact-form-7

Code Review | Autocomplete Location field Contact Form 7

WordPress plugin Autocomplete Location field Contact Form 7 scored89%from 54 tests.

About plugin

  • Plugin page: autocomplete-loca...
  • Plugin version: 3.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 9, 2019
  • Latest release: Nov 3, 2023
  • Number of updates: 14
  • Update frequency: every 101.8 days
  • Top authors: gravitymaster97 (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active /7,410 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Server-side resources used by Autocomplete Location field Contact Form 7
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.63 ▼2.07
Dashboard /wp-admin3.31 ▲0.0046.91 ▼1.31
Posts /wp-admin/edit.php3.36 ▲0.0043.13 ▼2.65
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.03 ▼7.33
Media Library /wp-admin/upload.php3.23 ▲0.0034.45 ▼5.39

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Autocomplete Location field Contact Form 7
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.34 ▲0.081.82 ▲0.2045.01 ▲1.66
Dashboard /wp-admin2,198 ▲185.61 ▼0.0783.95 ▼15.3237.90 ▼9.85
Posts /wp-admin/edit.php2,100 ▼32.01 ▲0.0235.05 ▼2.0537.12 ▲1.34
Add New Post /wp-admin/post-new.php1,526 ▼1023.03 ▲4.60664.48 ▼28.5657.68 ▼0.97
Media Library /wp-admin/upload.php1,394 ▼04.29 ▲0.0496.43 ▼4.3640.89 ▼4.16

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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 90% 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 your attention: The official readme.txt might help

autocomplete-location-field-contact-form-7/gm-cf7-auto-address.php 92% from 13 tests

The main file in "Autocomplete Location field Contact Form 7" v. 3.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("autocomplete-location-field-contact-form-7.php" instead of "gm-cf7-auto-address.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 plugin561 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP47326535
CSS10026

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity11.67
▷ Minimum class complexity3.00
▷ Maximum class complexity23.00
Average method complexity3.13
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.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

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/whatsapp.png22.33KB9.29KB▼ 58.41%