84% smart-google-map

Code Review | Smart Google Map

WordPress plugin Smart Google Map scored 84% from 54 tests.

About plugin

  • Plugin page: smart-google-map
  • Plugin version: 1.5
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.1
  • WordPress version: 6.3.1
  • First release: Oct 10, 2017
  • Latest release: Dec 31, 2017
  • Number of updates: 7
  • Update frequency: every 13.7 days
  • Top authors: imdr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 592 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼6.37ms] Passed 4 tests

Analyzing server-side resources used by Smart Google Map
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0746.17 ▲2.41
Dashboard /wp-admin3.38 ▲0.0750.69 ▼5.69
Posts /wp-admin/edit.php3.43 ▲0.0759.14 ▲5.09
Add New Post /wp-admin/post-new.php5.96 ▲0.0793.69 ▼18.85
Media Library /wp-admin/upload.php3.30 ▲0.0739.42 ▼3.35
Category /wp-admin/edit-tags.php?taxonomy=marker-category&post_type=smart-google-map3.2933.93
Settings /wp-admin/edit.php?post_type=smart-google-map&page=sgm-settings3.2638.35
All Markers /wp-admin/edit.php?post_type=smart-google-map3.3441.76
Add New /wp-admin/post-new.php?post_type=smart-google-map3.4253.79

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
google_map_api_key
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Smart Google Map
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,863 ▲11713.23 ▼1.355.52 ▲3.7249.11 ▼5.61
Dashboard /wp-admin2,241 ▲565.83 ▼0.03130.36 ▲5.0061.59 ▲14.34
Posts /wp-admin/edit.php2,127 ▲351.98 ▼0.0748.93 ▲1.9641.50 ▼0.47
Add New Post /wp-admin/post-new.php1,562 ▲15123.06 ▲5.29679.50 ▼7.3269.66 ▲9.02
Media Library /wp-admin/upload.php1,423 ▲354.14 ▼0.04114.25 ▼55.4758.22 ▼11.89
Category /wp-admin/edit-tags.php?taxonomy=marker-category&post_type=smart-google-map1,3002.1431.8831.94
Settings /wp-admin/edit.php?post_type=smart-google-map&page=sgm-settings8672.0334.4545.34
All Markers /wp-admin/edit.php?post_type=smart-google-map1,0991.9341.2634.58
Add New /wp-admin/post-new.php?post_type=smart-google-map2,3457.74173.2865.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • google_map_api_key
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, 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 items
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-google-map/inc/sgm-settings-page.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-google-map/inc/sgm-custom-post.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/smart-google-map/inc/sgm-shortcode.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-google-map/inc/sgm-meta-box.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-google-map/inc/sgm-custom-post.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

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
6 plugin tags: dynamic google map, marker, smart google map, dynamic map, google map...

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

The main file in "Smart Google Map" v. 1.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
33 characters long description:
Just an another Google Map plugin

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
No dangerous file extensions were detected341 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP56611341

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin