67% mipl-stockist-store-locator

Code Review | MIPL Stockist/Store Locator

WordPress plugin MIPL Stockist/Store Locator scored67%from 54 tests.

About plugin

  • Plugin page: mipl-stockist-sto...
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1.12-6.4
  • WordPress version: 6.3.1
  • First release: Nov 18, 2022
  • Latest release: Nov 1, 2023
  • Number of updates: 17
  • Update frequency: every 20.6 days
  • Top authors: mulika (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /850 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.45MB] [CPU: ▼2.66ms] Passed 4 tests

Analyzing server-side resources used by MIPL Stockist/Store Locator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.91 ▲0.4455.34 ▲14.60
Dashboard /wp-admin3.82 ▲0.4751.34 ▼10.24
Posts /wp-admin/edit.php3.88 ▲0.5259.41 ▲11.35
Add New Post /wp-admin/post-new.php6.35 ▲0.4688.40 ▼14.63
Media Library /wp-admin/upload.php3.67 ▲0.4338.47 ▲2.90
Add New /wp-admin/post-new.php?post_type=mipl_sl_stores3.9157.11
Stores /wp-admin/edit.php?post_type=mipl_sl_stores3.7441.61
Store Category /wp-admin/edit-tags.php?taxonomy=mipl_sl_store_category&post_type=mipl_sl_stores3.6939.45
Tools /wp-admin/edit.php?post_type=mipl_sl_stores&page=mipl-tools3.6640.64
Settings /wp-admin/edit.php?post_type=mipl_sl_stores&page=mipl-sl-settings3.8146.17

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 60 new files
Database: 1 new table, 24 new options
New tables
wp_mipl_store_locator
New WordPress options
db_upgraded
_mipl_sl_display_time_on_list
_mipl_sl_display_time_on_infowindow
_mipl_sl_google_map_style
_mipl_sl_layout_type
_mipl_sl_display_social_on_infowindow
_mipl_sl_google_map_type
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for MIPL Stockist/Store Locator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,100 ▲35416.48 ▲1.9523.76 ▲22.0040.37 ▼1.60
Dashboard /wp-admin2,375 ▲1976.32 ▲0.58113.09 ▲0.6239.49 ▼4.84
Posts /wp-admin/edit.php2,303 ▲2033.49 ▲1.5345.75 ▲11.9232.92 ▼2.11
Add New Post /wp-admin/post-new.php1,573 ▲4723.24 ▲0.18632.43 ▼45.5528.14 ▼25.11
Media Library /wp-admin/upload.php1,434 ▲314.19 ▼0.0381.20 ▼26.0342.81 ▼2.06
Add New /wp-admin/post-new.php?post_type=mipl_sl_stores2,8957.83184.0975.46
Stores /wp-admin/edit.php?post_type=mipl_sl_stores1,3123.4549.6131.21
Store Category /wp-admin/edit-tags.php?taxonomy=mipl_sl_store_category&post_type=mipl_sl_stores1,4803.2840.2830.72
Tools /wp-admin/edit.php?post_type=mipl_sl_stores&page=mipl-tools1,0853.1838.9728.90
Settings /wp-admin/edit.php?post_type=mipl_sl_stores&page=mipl-sl-settings3,0433.5955.9085.36

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_mipl_store_locator
  • Zombie WordPress options detected upon uninstall: 24 options
    • _mipl_sl_primary_color
    • _mipl_sl_layout_type
    • _mipl_sl_map_height
    • _mipl_sl_distance_unit
    • db_upgraded
    • _mipl_sl_map_current_location_icon
    • widget_theysaidso_widget
    • _mipl_sl_google_map_style
    • _mipl_sl_display_social_on_infowindow
    • _mipl_sl_disable_stores_public_url
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/mipl-stockist-store-locator/index.php
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mipl_sl_get_label() in wp-content/plugins/mipl-stockist-store-locator/views/mipl-stockist-stores-details.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/mipl-stockist-store-locator/views/mipl-stockist-admin-settings.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/mipl-stockist-store-locator/mipl-stockist-store-locator.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mipl_sl_get_label() in wp-content/plugins/mipl-stockist-store-locator/views/mipl-stockist-stores-social-media-details.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/mipl-stockist-store-locator/single-mipl_sl_stores.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mipl-stockist-store-locator/views/view-mipl-sl-custom-fields-tab-panel.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/mipl-stockist-store-locator/views/mipl-stockist-stores-opening-details.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/mipl-stockist-store-locator/views/mipl-stockist-widgets.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (Add Store Details), #2 (Store Categories), #3 (Stockist Settings > General), #4 (Stockist Settings > Layout), #5 (Stockist Settings > Labels), #6 (Stockist Settings > Google Map), #7 (Stockist Layout with Map), #8 (Stockist Layout with Map)
  • Donate link: Invalid URI found ("")
Please take inspiration from this readme.txt

mipl-stockist-store-locator/mipl-stockist-store-locator.php 85% from 13 tests

Analyzing the main PHP file in "MIPL Stockist/Store Locator" version 1.2.0
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 218 characters long)
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.4" instead of "7.0")

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
Good job! No executable or dangerous file extensions detected3,657 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP187881003,475
SVG3240102
Markdown135070
JavaScript6016
CSS4004

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity48.67
▷ Minimum class complexity3.00
▷ Maximum class complexity143.00
Average method complexity6.84
▷ Minimum method complexity1.00
▷ Maximum method complexity71.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods46
▷ Static methods00.00%
▷ Public methods46100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions1794.44%
▷ Anonymous functions15.56%
Constants5
▷ Global constants5100.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
23 PNG files occupy 0.46MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/mipl-sl-marker-4.png2.54KB1.41KB▼ 44.22%
assets/images/mipl-sl-marker-9.png2.54KB1.44KB▼ 43.34%
assets/images/mipl_sl_top_filter_with_right_side_listing.png34.38KB13.95KB▼ 59.44%
assets/images/mipl_sl_leftside_list_and_filter_on_map.png37.58KB14.37KB▼ 61.77%
assets/images/mipl_sl_top_filter_with_full_map.png39.77KB16.47KB▼ 58.58%