73% stylish-google-map

Code Review | Stylish Google Map

WordPress plugin Stylish Google Map scored73%from 54 tests.

About plugin

  • Plugin page: stylish-google-map
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7
  • WordPress version: 6.3.1
  • First release: Dec 9, 2016
  • Latest release: Dec 23, 2016
  • Number of updates: 17
  • Update frequency: every 0.5 days
  • Top authors: krishpraja (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /824 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼3.29ms] Passed 4 tests

Analyzing server-side resources used by Stylish Google Map
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0942.47 ▲0.40
Dashboard /wp-admin3.40 ▲0.1050.32 ▼1.78
Posts /wp-admin/edit.php3.51 ▲0.1650.84 ▼2.50
Add New Post /wp-admin/post-new.php6.00 ▲0.1294.54 ▼6.85
Media Library /wp-admin/upload.php3.32 ▲0.0938.99 ▼2.03
Add New /wp-admin/post-new.php?post_type=stylish-google-map3.3340.76
Stylish Google Maps /wp-admin/edit.php?post_type=stylish-google-map3.3638.03
SGM Settings /wp-admin/edit.php?post_type=stylish-google-map&page=sgm3.2639.77

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_stylish_google_map
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Stylish Google Map
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲9114.74 ▲1.212.10 ▲0.3439.21 ▼4.17
Dashboard /wp-admin2,228 ▲405.85 ▲0.73100.26 ▼11.8172.87 ▲29.82
Posts /wp-admin/edit.php2,135 ▲461.97 ▼0.0838.28 ▼4.9634.85 ▲0.47
Add New Post /wp-admin/post-new.php1,548 ▲2917.53 ▼5.68699.74 ▲24.5358.54 ▲5.12
Media Library /wp-admin/upload.php1,422 ▲344.21 ▼0.01101.68 ▼17.1164.42 ▲16.37
Add New /wp-admin/post-new.php?post_type=stylish-google-map1,5992.5250.1763.22
Stylish Google Maps /wp-admin/edit.php?post_type=stylish-google-map1,0901.9633.4130.40
SGM Settings /wp-admin/edit.php?post_type=stylish-google-map&page=sgm8442.0525.8929.97

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_stylish_google_map
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/post-new.php?post_type=stylish-google-map
    • > Deprecated in wp-admin/includes/template.php+1443
    Non-static method SGM_Meta_Box::sgm_shortcode_metabox_html() should not be called statically
    • > GET request to /wp-admin/post-new.php?post_type=stylish-google-map
    • > Notice in wp-content/plugins/stylish-google-map/sgm_main.php+242
    Undefined index: post
    • > GET request to /wp-admin/edit.php?post_type=stylish-google-map&page=sgm
    • > Notice in wp-content/plugins/stylish-google-map/sgm_main.php+117
    Trying to access array offset on value of type bool

SRP 0% 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 items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/stylish-google-map/stylish-google-map.php
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/stylish-google-map/sgm_widget.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function shortcode_atts() in wp-content/plugins/stylish-google-map/sgm_template.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/stylish-google-map/sgm_main.php:55
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/stylish-google-map/sgm_widget_template.php:7

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 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
5 plugin tags: simple map, google, maps, map, map plugin

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

This is the main PHP file of "Stylish Google Map" version 1.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
65 characters long description:
Very simple way to add stylish google map to your wordpress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin560 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP5113181520
JavaScript121225
CSS21415

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity12.00
▷ Minimum class complexity6.00
▷ Maximum class complexity18.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes150.00%
▷ Concrete classes150.00%
▷ Final classes00.00%
Methods9
▷ Static methods333.33%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions990.00%
▷ Anonymous functions110.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/plugin_icon.png1.23KB0.46KB▼ 62.34%
images/map_point.png1.39KB0.67KB▼ 51.68%