10% st-google-map

Code Review | ST Google Map

WordPress plugin ST Google Map scored10%from 54 tests.

About plugin

  • Plugin page: st-google-map
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.0
  • WordPress version: 6.3.1
  • First release: Oct 23, 2014
  • Latest release: Oct 29, 2014
  • Number of updates: 8
  • Update frequency: every 0.8 days
  • Top authors: beautifultemplates (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /824 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/st-google-map/widget.php+104
    Function create_function() is deprecated

Server metrics [RAM: ▼1.97MB] [CPU: ▼56.29ms] Passed 4 tests

Analyzing server-side resources used by ST Google Map
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.91 ▼31.67
Dashboard /wp-admin2.05 ▼1.306.88 ▼52.14
Posts /wp-admin/edit.php2.05 ▼1.317.74 ▼41.62
Add New Post /wp-admin/post-new.php2.05 ▼3.846.41 ▼99.71
Media Library /wp-admin/upload.php2.05 ▼1.185.43 ▼29.44
ST Google Map /wp-admin/options-general.php?page=st_google_map2.056.85

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 56 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-comments
st_mapWP_admin_notice
db_upgraded
can_compress_scripts
widget_st_map_widget
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

ST Google Map: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,860 ▲8915.05 ▲0.744.73 ▲2.8438.21 ▼3.55
Dashboard /wp-admin2,230 ▲386.63 ▲1.55128.81 ▲14.1939.24 ▼6.75
Posts /wp-admin/edit.php2,127 ▲353.41 ▲1.4052.80 ▲12.5860.32 ▲23.52
Add New Post /wp-admin/post-new.php1,377 ▼14317.74 ▼5.44582.50 ▼14.5728.65 ▼21.70
Media Library /wp-admin/upload.php1,422 ▲345.97 ▲1.75107.33 ▲12.0142.10 ▼1.51
ST Google Map /wp-admin/options-general.php?page=st_google_map1,8917.29131.21146.33

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
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/st-google-map/widget.php+104
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 8 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_st_map_widget
    • st_mapWP_admin_notice
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=st_google_map
    • > Deprecated in wp-content/plugins/st-google-map/widget.php+104
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=st_google_map
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in st_map_widget is deprecated since version 4.3.0! Use __construct() instead.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=st_google_map
    • > Notice in wp-content/plugins/st-google-map/st-google-map.php+173
    Trying to access array offset on value of type null

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
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/st-google-map/widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/st-google-map/st-google-map.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=st_google_map
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?v=3.exp&language=en&sensor=false&libraries=places 235:51 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"
    • > GET request to /wp-admin/options-general.php?page=st_google_map
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?v=3.exp&language=en&sensor=false&libraries=places 164:311 "google.maps.event.addDomListener() is deprecated, use the standard\naddEventListener() method instead:\nhttps://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener\nThe feature will continue to work and there is no plan to decommission\nit."
    • > GET request to /wp-admin/options-general.php?page=st_google_map
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/st-google-map/js/admin.js:94:37)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=st_google_map
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function
    • > GET request to /wp-admin/options-general.php?page=st_google_map
    • > Network (severe)
    http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=1000&callback=jQuery370045559356483899816_1696999634146&q=http%3A%2F%2Fbeautiful-templates.com%2Fevo%2Fcategory%2Fproducts%2Ffeed%2F&_=1696999634147 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: google map, google map shortcode

st-google-map/st-google-map.php Passed 13 tests

The primary PHP file in "ST Google Map" version 1.0.0 is used by WordPress to initiate all plugin functionality
47 characters long description:
Easy to create google map with simple shortcode

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin11,237 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript101,6841,3587,108
CSS776452,651
PHP21724668
SVG100520
HTML1144199
PO File1373791

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity34.50
▷ Minimum class complexity15.00
▷ Maximum class complexity54.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods40
▷ Static methods00.00%
▷ Public methods40100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
24 PNG files occupy 2.31MB with 0.91MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/images/marker-icon.png1.71KB1.56KB▼ 8.59%
js/images/marker-icon-2x.png3.94KB2.53KB▼ 35.71%
images/pencil.png1.19KB0.32KB▼ 73.05%
doc/assets/css/img/warning.png0.59KB0.50KB▼ 14.99%
doc/assets/images/edit.png274.12KB97.25KB▼ 64.52%