78% track-geolocation-of-users-using-contact-form-7

Code Review | Track Geolocation Of Users Using Contact Form 7

WordPress plugin Track Geolocation Of Users Using Contact Form 7 scored78%from 54 tests.

About plugin

  • Plugin page: track-geolocation...
  • Plugin version: 1.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 11, 2020
  • Latest release: Aug 11, 2023
  • Number of updates: 11
  • Update frequency: every 96.8 days
  • Top authors: zealopensource (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

600+ active /3,038 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Track Geolocation Of Users Using Contact Form 7
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.16 ▼2.53
Dashboard /wp-admin3.31 ▲0.0044.52 ▼9.38
Posts /wp-admin/edit.php3.36 ▲0.0044.54 ▼1.25
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.58 ▼3.07
Media Library /wp-admin/upload.php3.23 ▲0.0035.72 ▲1.68
Geolocation Details /wp-admin/edit.php?post_type=cfgeozw_data3.0423.07
Geolocation Settings /wp-admin/admin.php?page=geolocation-setting3.0024.25

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Track Geolocation Of Users Using Contact Form 7
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.42 ▼0.181.68 ▼0.1443.67 ▲0.45
Dashboard /wp-admin2,198 ▲215.62 ▲0.0490.26 ▼9.1441.31 ▲0.17
Posts /wp-admin/edit.php2,103 ▼01.98 ▼0.0339.00 ▲3.9735.78 ▲0.82
Add New Post /wp-admin/post-new.php1,526 ▼523.34 ▲0.25627.44 ▼20.3762.49 ▲5.04
Media Library /wp-admin/upload.php1,403 ▲34.16 ▲0.0395.51 ▼11.9240.90 ▼2.68
Geolocation Details /wp-admin/edit.php?post_type=cfgeozw_data280.420.103.63
Geolocation Settings /wp-admin/admin.php?page=geolocation-setting280.420.103.61

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • cfgeo_debug_mode
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/track-geolocation-of-users-using-contact-form-7/inc/admin/template/tglcf.template.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/edit.php?post_type=cfgeozw_data
    • > Network (severe)
    wp-admin/edit.php?post_type=cfgeozw_data - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/admin.php?page=geolocation-setting
    • > Network (severe)
    wp-admin/admin.php?page=geolocation-setting - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Requires at least: Version format is invalid
You can take inspiration from this readme.txt

track-geolocation-of-users-using-contact-form-7/track-geolocation-of-users-using-contact-form-7.php Passed 13 tests

The principal PHP file in "Track Geolocation Of Users Using Contact Form 7" v. 1.4 is loaded by WordPress automatically on each request
59 characters long description:
Fetch Geolocation of user when user submits contact form 7.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin1,371 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP72245231,197
JavaScript516398
CSS310076

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity42.60
▷ Minimum class complexity1.00
▷ Maximum class complexity150.00
Average method complexity5.08
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods51
▷ Static methods11.96%
▷ Public methods51100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions120.00%
▷ Anonymous functions480.00%
Constants8
▷ Global constants8100.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
No PNG images were found in this plugin