10% simple-google-contact-map

Code Review | Simple Google Contact Map

WordPress plugin Simple Google Contact Map scored10%from 54 tests.

About plugin

  • Plugin page: simple-google-con...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.3
  • WordPress version: 6.3.1
  • First release: Sep 5, 2015
  • Latest release: Sep 8, 2015
  • Number of updates: 14
  • Update frequency: every 0.3 days
  • Top authors: praveencrony (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,543 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/simple-google-contact-map/googlemap-sgcm.php+178
    Function create_function() is deprecated

Server metrics [RAM: ▼1.91MB] [CPU: ▼53.10ms] Passed 4 tests

An overview of server-side resources used by Simple Google Contact Map
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.396.60 ▼33.63
Dashboard /wp-admin2.10 ▼1.215.38 ▼49.34
Posts /wp-admin/edit.php2.10 ▼1.266.63 ▼42.77
Add New Post /wp-admin/post-new.php2.10 ▼3.795.44 ▼86.66
Media Library /wp-admin/upload.php2.10 ▼1.135.88 ▼28.34
Google Map - SGCM /wp-admin/options-general.php?page=sgc-map-option2.108.26

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_sgcm_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Simple Google Contact Map
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6013.64 ▼0.762.15 ▲0.2846.73 ▼2.39
Dashboard /wp-admin2,227 ▲245.84 ▲0.03120.05 ▲19.5346.91 ▲6.55
Posts /wp-admin/edit.php2,109 ▲92.06 ▲0.0340.73 ▲2.9532.26 ▼6.21
Add New Post /wp-admin/post-new.php1,550 ▼023.41 ▲0.19605.72 ▼87.1462.42 ▲9.51
Media Library /wp-admin/upload.php1,409 ▲64.20 ▼0.0695.80 ▼23.0546.49 ▼1.78
Google Map - SGCM /wp-admin/options-general.php?page=sgc-map-option1,0322.0127.6332.58

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/simple-google-contact-map/googlemap-sgcm.php+178
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_sgcm_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=sgc-map-option
    • > Deprecated in wp-content/plugins/simple-google-contact-map/googlemap-sgcm.php+178
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=sgc-map-option
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Sgcm_Widget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=sgc-map-option
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=sgc-map-option
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=sgc-map-option
    • > Notice in wp-content/plugins/simple-google-contact-map/options.php+125
    Undefined variable: msg
  • 23 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=sgc-map-option
    • > Notice in wp-content/plugins/simple-google-contact-map/options.php+166
    Trying to access array offset on value of type bool

SRP 50% 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
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/simple-google-contact-map/options.php:112
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/simple-google-contact-map/googlemap-sgcm.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: contact map, direction, google map, contact, contact google map...

simple-google-contact-map/googlemap-sgcm.php 92% from 13 tests

Analyzing the main PHP file in "Simple Google Contact Map" version 1.0
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-google-contact-map.php" instead of "googlemap-sgcm.php")

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
No dangerous file extensions were detected348 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP26719292
CSS115656

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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