68% shmapper-by-teplitsa

Code Review | shMapper by Teplitsa

WordPress plugin shMapper by Teplitsa scored68%from 54 tests.

About plugin

  • Plugin page: shmapper-by-teplitsa
  • Plugin version: 1.4.15
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: May 16, 2019
  • Latest release: Sep 24, 2023
  • Number of updates: 75
  • Update frequency: every 21.3 days
  • Top authors: denis.cherniatev (46.67%)teplosup (40%)burdianov (16%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /4,783 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.48MB] [CPU: ▲6.09ms] Passed 4 tests

A check of server-side resources used by shMapper by Teplitsa
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.4845.72 ▲2.47
Dashboard /wp-admin3.80 ▲0.5058.69 ▲7.01
Posts /wp-admin/edit.php3.89 ▲0.5360.43 ▲10.22
Add New Post /wp-admin/post-new.php6.56 ▲0.67117.25 ▲28.75
Media Library /wp-admin/upload.php3.65 ▲0.4239.31 ▲4.65
Map track types /wp-admin/edit-tags.php?taxonomy=shmapper_track_type3.7845.27
all Maps /wp-admin/edit.php?post_type=shm_map3.8049.04
All Map tracks /wp-admin/edit.php?post_type=shmapper_track3.8344.06
all Map markers /wp-admin/edit.php?post_type=shm_point3.8346.17
Settings /wp-admin/admin.php?page=shm_settings_page3.6841.90
Map marker types /wp-admin/edit-tags.php?taxonomy=shm_point_type3.7347.78
Shmapper /wp-admin/admin.php?page=shm_page3.6039.12
All Map marker messages /wp-admin/edit.php?post_type=shm_point_msg3.8346.79
all Map Requests /wp-admin/edit.php?post_type=shm_request3.8347.95

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 154 new files
Database: 1 new table, 9 new options
New tables
wp_point_map
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
shmapper-drive
shmapper-by-teplitsa
widget_shmlocationnavigatorwidget
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by shMapper by Teplitsa
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,426 ▲66518.14 ▲3.4915.69 ▲13.8144.01 ▼4.86
Dashboard /wp-admin2,660 ▲4567.76 ▲1.71152.73 ▲30.8249.63 ▲5.19
Posts /wp-admin/edit.php2,569 ▲4695.07 ▲3.0773.35 ▲36.4943.71 ▲9.29
Add New Post /wp-admin/post-new.php6,402 ▲4,85724.19 ▲1.01928.21 ▲240.2145.09 ▼10.35
Media Library /wp-admin/upload.php1,737 ▲3375.23 ▲1.01109.88 ▲3.1052.09 ▲2.52
Map track types /wp-admin/edit-tags.php?taxonomy=shmapper_track_type1,6975.1577.2537.23
all Maps /wp-admin/edit.php?post_type=shm_map1,6235.0271.4944.33
All Map tracks /wp-admin/edit.php?post_type=shmapper_track1,5684.9868.0536.47
all Map markers /wp-admin/edit.php?post_type=shm_point1,5805.0668.4336.45
Settings /wp-admin/admin.php?page=shm_settings_page3,4425.4483.3565.78
Map marker types /wp-admin/edit-tags.php?taxonomy=shm_point_type1,7305.1570.2143.58
Shmapper /wp-admin/admin.php?page=shm_page3,4535.4783.7550.97
All Map marker messages /wp-admin/edit.php?post_type=shm_point_msg1,5544.9667.8641.54
all Map Requests /wp-admin/edit.php?post_type=shm_request1,5914.9968.6236.82

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie tables detected upon uninstall: 1 table
    • wp_point_map
  • Zombie WordPress options detected upon uninstall: 9 options
    • shmapper-drive
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • shmapper-by-teplitsa
    • widget_shmlocationnavigatorwidget
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 32× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'SMC_Post' not found in wp-content/plugins/shmapper-by-teplitsa/class/ShmMap.class.php:8
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/shmapper-by-teplitsa/shmapperTracks.plugin.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shmapper-by-teplitsa/inc/editor/blocks.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'League\\Csv\\ByteSequence' not found in wp-content/plugins/shmapper-by-teplitsa/assets/google-sheets/vendor/league/csv/src/AbstractCsv.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function recaptcha_mailhide_html() in wp-content/plugins/shmapper-by-teplitsa/assets/recaptcha-php/example-mailhide.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function recaptcha_get_html() in wp-content/plugins/shmapper-by-teplitsa/assets/recaptcha-php/example-captcha.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'SMC_Post' not found in wp-content/plugins/shmapper-by-teplitsa/class/ShMapperRequest.class.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'SMC_Post' not found in wp-content/plugins/shmapper-by-teplitsa/class/ShMapperTracksPoint.class.php:8
    • > PHP Warning
      Use of undefined constant SHM_REAL_PATH - assumed 'SHM_REAL_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/shmapper-by-teplitsa/inc/editor/editor.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/shmapper-by-teplitsa/inc/shm-functions.php:127

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/edit-tags.php?taxonomy=shm_point_type
    • > Rendering (warning) in unknown
    /wp-admin/edit-tags.php?taxonomy=shm_point_type 273 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Edit map form example), #2 (Map and feedback form example)
Please take inspiration from this readme.txt

shmapper-by-teplitsa/shmapper.php 92% from 13 tests

The entry point to "shMapper by Teplitsa" version 1.4.15 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("shmapper-by-teplitsa.php" instead of "shmapper.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected25,000 lines of code in 125 files:
LanguageFilesBlank linesComment linesLines of code
PHP741,4282,46811,677
JavaScript188907016,888
CSS163381433,573
SVG12541,570
Markdown14050645
PO File1237275487
JSON300160

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity24.68
▷ Minimum class complexity1.00
▷ Maximum class complexity136.00
Average method complexity3.48
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces4
Interfaces1
Traits0
Classes49
▷ Abstract classes12.04%
▷ Concrete classes4897.96%
▷ Final classes12.08%
Methods478
▷ Static methods23549.16%
▷ Public methods42889.54%
▷ Protected methods408.37%
▷ Private methods102.09%
Functions71
▷ Named functions5273.24%
▷ Anonymous functions1926.76%
Constants51
▷ Global constants2854.90%
▷ Class constants2345.10%
▷ Public constants23100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
18 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/layers.png0.68KB1.05KB0.00%
assets/img/block-example.png11.61KB5.74KB▼ 50.53%
assets/css/images/layers-2x.png1.23KB1.67KB0.00%
assets/css/img/search-disabled.png0.38KB0.19KB▼ 50.26%
assets/img/check_checked.png1.75KB0.91KB▼ 47.99%