74% our-geolocation

Code Review | Our Geolocation

WordPress plugin Our Geolocation scored74%from 54 tests.

About plugin

  • Plugin page: our-geolocation
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Jul 26, 2014
  • Latest release: Jul 26, 2014
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: digontoahsan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,752 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.77ms] Passed 4 tests

Analyzing server-side resources used by Our Geolocation
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0246.39 ▼3.00
Dashboard /wp-admin3.33 ▲0.0246.40 ▼8.12
Posts /wp-admin/edit.php3.38 ▲0.0249.87 ▼1.98
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.98 ▼9.43
Media Library /wp-admin/upload.php3.25 ▲0.0235.72 ▼2.51

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 9 new options
New WordPress options
our-geolocation-getdir
theysaidso_admin_options
widget_recent-posts
our-geolocation-width
our-geolocation-height
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Our Geolocation
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲18214.53 ▲0.1627.61 ▲25.7537.44 ▼8.36
Dashboard /wp-admin2,222 ▲345.06 ▲0.1896.37 ▼17.9441.33 ▼1.65
Posts /wp-admin/edit.php2,105 ▲162.02 ▲0.0133.63 ▼5.2934.66 ▲1.54
Add New Post /wp-admin/post-new.php1,532 ▼423.42 ▲0.24670.52 ▲6.0456.31 ▼1.24
Media Library /wp-admin/upload.php1,401 ▲134.21 ▲0.0395.72 ▼6.8047.20 ▼0.88

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'unset_geoloc_options' not found or invalid function name
  • The uninstall procedure has failed, leaving 9 options in the database
    • our-geolocation-getdir
    • widget_theysaidso_widget
    • can_compress_scripts
    • our-geolocation-width
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • our-geolocation-height

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/our-geolocation/our-geolocation.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: ""
  • Tags: Too many tags (20 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

our-geolocation/our-geolocation.php Passed 13 tests

The entry point to "Our Geolocation" version 1.0 is a PHP file that has certain tags in its header comment area
55 characters long description:
Simply show your geographical location to your visitor.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin333 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP21911245
JavaScript214088

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin