83% map-store-location

Code Review | Map Store Locator

WordPress plugin Map Store Locator scored83%from 54 tests.

About plugin

  • Plugin page: map-store-location
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.8.2
  • WordPress version: 6.3.1
  • First release: Jan 2, 2020
  • Latest release: Nov 23, 2021
  • Number of updates: 14
  • Update frequency: every 49.5 days
  • Top authors: jdevsig (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /892 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.18MB] [CPU: ▼5.02ms] Passed 4 tests

A check of server-side resources used by Map Store Locator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1637.64 ▼7.37
Dashboard /wp-admin3.49 ▲0.1850.25 ▼4.30
Posts /wp-admin/edit.php3.60 ▲0.2452.11 ▼3.24
Add New Post /wp-admin/post-new.php6.07 ▲0.1886.89 ▼5.15
Media Library /wp-admin/upload.php3.41 ▲0.1837.54 ▲2.56

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 39 new files
Database: no new tables, 7 new options
New WordPress options
widget_msl
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Map Store Locator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,930 ▲19515.32 ▲0.5833.46 ▲31.6240.63 ▼2.91
Dashboard /wp-admin2,222 ▲375.85 ▲0.89105.73 ▼4.3339.22 ▼3.43
Posts /wp-admin/edit.php2,105 ▲162.01 ▼0.0137.01 ▼0.4931.87 ▼6.72
Add New Post /wp-admin/post-new.php1,546 ▲3223.31 ▲5.64671.44 ▼7.48100.62 ▲34.62
Media Library /wp-admin/upload.php1,404 ▲164.22 ▲0.04118.94 ▼4.7142.61 ▼8.34

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • widget_msl
    • db_upgraded
    • can_compress_scripts

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/map-store-location/classes/widgets/MslWidget.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/map-store-location/classes/widgets/MslWidget.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/map-store-location/classes/widgets/MslWidget.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Tags: Too many tags (17 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

map-store-location/msl-plugins.php 85% from 13 tests

The main file in "Map Store Locator" v. 1.2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("map-store-location.php" instead of "msl-plugins.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected1,910 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP599328878
SVG102510813
PO File14447106
CSS2111187
JSON10023
JavaScript10103

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.06
Average class complexity4.67
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.23
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods48
▷ Static methods00.00%
▷ Public methods48100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
14 PNG files occupy 1.20MB with 0.54MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
doc/img/type_icon.PNG27.65KB13.47KB▼ 51.30%
doc/img/menu.png9.80KB5.99KB▼ 38.86%
doc/img/ext_add.png7.01KB4.39KB▼ 37.36%
doc/img/ext_menu.png12.26KB7.33KB▼ 40.24%
doc/img/search_MSL.png166.45KB68.85KB▼ 58.64%