84% geolocate-comments

Code Review | Geolocate Comments

WordPress plugin Geolocate Comments scored 84% from 54 tests.

About plugin

  • Plugin page: geolocate-comments
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-6.0.2
  • WordPress version: 6.3.1
  • First release: Jun 7, 2022
  • Latest release: Sep 11, 2022
  • Number of updates: 4
  • Update frequency: every 23.8 days
  • Top authors: jwz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 961 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.49ms] Passed 4 tests

Analyzing server-side resources used by Geolocate Comments
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0633.56 ▼8.17
Dashboard /wp-admin3.36 ▲0.0643.80 ▼5.99
Posts /wp-admin/edit.php3.41 ▲0.0645.97 ▼6.50
Add New Post /wp-admin/post-new.php5.94 ▲0.0694.10 ▲2.99
Media Library /wp-admin/upload.php3.28 ▲0.0635.41 ▼1.30

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Geolocate Comments
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.66 ▼0.651.63 ▼0.1837.68 ▼12.76
Dashboard /wp-admin2,209 ▲214.86 ▼1.04110.44 ▲7.0642.18 ▼2.42
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0639.87 ▲0.4735.08 ▼2.20
Add New Post /wp-admin/post-new.php1,542 ▲818.69 ▼4.45603.91 ▼78.4448.79 ▼14.37
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.0597.15 ▼11.2442.49 ▼5.50

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
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 add_action() in wp-content/plugins/geolocate-comments/geolocate-comments.php:219

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: comments, geolocation

geolocate-comments/geolocate-comments.php Passed 13 tests

"Geolocate Comments" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
50 characters long description:
Save the geolocation when a new comment is posted.

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
Everything looks great! No dangerous files found in this plugin345 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP19883345

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.60
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin