84% simple-google-maps-widget

Code Review | Simple Google Maps Widget

WordPress plugin Simple Google Maps Widget scored84%from 54 tests.

About plugin

  • Plugin page: simple-google-map...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.7
  • WordPress version: 6.3.1
  • First release: Aug 3, 2018
  • Latest release: Aug 27, 2019
  • Number of updates: 9
  • Update frequency: every 43.2 days
  • Top authors: ays-pro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /600 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.06ms] Passed 4 tests

A check of server-side resources used by Simple Google Maps Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.69 ▼0.66
Dashboard /wp-admin3.32 ▲0.0149.73 ▲1.59
Posts /wp-admin/edit.php3.37 ▲0.0145.54 ▼2.97
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.31 ▼6.21
Media Library /wp-admin/upload.php3.24 ▲0.0135.63 ▲2.30

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Simple Google Maps Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲16213.57 ▼1.027.49 ▲5.6639.44 ▼4.42
Dashboard /wp-admin2,208 ▲204.87 ▼1.03101.27 ▼2.8438.00 ▼5.11
Posts /wp-admin/edit.php2,091 ▲22.01 ▼0.0434.21 ▼2.8036.07 ▲2.94
Add New Post /wp-admin/post-new.php1,539 ▲1718.03 ▼5.02612.95 ▼4.7749.93 ▼3.80
Media Library /wp-admin/upload.php1,390 ▲54.23 ▼0.0294.51 ▼5.9742.58 ▼2.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_wp_maps_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-google-maps-widget/simple_google_maps_widget.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: gmap, google maps, wordpress google maps widget, simle google maps, google map

simple-google-maps-widget/simple_google_maps_widget.php 92% from 13 tests

"Simple Google Maps Widget" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-google-maps-widget.php" instead of "simple_google_maps_widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected209 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP22838154
CSS26041
YAML11014

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity35.00
▷ Minimum class complexity35.00
▷ Maximum class complexity35.00
Average method complexity6.67
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
PNG images were not found in this plugin