84% map-locator

Code Review | Map Locator

WordPress plugin Map Locator scored84%from 54 tests.

About plugin

  • Plugin page: map-locator
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Jan 14, 2014
  • Latest release: Jan 14, 2014
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: Usama_Noman (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,549 total downloads

Benchmarks

Plugin footprint 83% 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.03MB] [CPU: ▼5.77ms] Passed 4 tests

A check of server-side resources used by Map Locator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.59 ▼6.62
Dashboard /wp-admin3.33 ▲0.0353.56 ▲1.62
Posts /wp-admin/edit.php3.38 ▲0.0349.53 ▼4.30
Add New Post /wp-admin/post-new.php5.91 ▲0.0382.36 ▼13.79
Media Library /wp-admin/upload.php3.26 ▲0.0339.80 ▲3.84

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
widget_map_locator_class
db_upgraded

Browser metrics Passed 4 tests

Map Locator: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.75 ▲0.201.95 ▼0.1436.28 ▼8.28
Dashboard /wp-admin2,198 ▲215.61 ▼0.0689.13 ▼3.3939.13 ▼3.83
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0336.17 ▲2.0833.71 ▼6.93
Add New Post /wp-admin/post-new.php1,526 ▼223.27 ▼0.13693.59 ▲0.2057.48 ▲6.22
Media Library /wp-admin/upload.php1,403 ▲64.10 ▼0.06111.27 ▲6.7148.84 ▼0.61

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_map_locator_class
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
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_shortcode() in wp-content/plugins/map-locator/map_locator.php:97

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (No screenshot description available.) image missing
The official readme.txt might help

map-locator/map_locator.php 92% from 13 tests

The main PHP file in "Map Locator" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("map-locator.php" instead of "map_locator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin136 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12716136

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 complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin