79% mw-google-maps

Code Review | MW Google Maps

WordPress plugin MW Google Maps scored79%from 54 tests.

About plugin

  • Plugin page: mw-google-maps
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.1.1
  • WordPress version: 6.3.1
  • First release: Mar 3, 2013
  • Latest release: Mar 2, 2015
  • Number of updates: 23
  • Update frequency: every 31.7 days
  • Top authors: inc2734 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /7,469 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.07MB] [CPU: ▲1.03ms] Passed 4 tests

Analyzing server-side resources used by MW Google Maps
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0843.44 ▲0.29
Dashboard /wp-admin3.38 ▲0.0750.21 ▲1.91
Posts /wp-admin/edit.php3.49 ▲0.1452.27 ▼0.07
Add New Post /wp-admin/post-new.php5.96 ▲0.0799.26 ▲7.71
Media Library /wp-admin/upload.php3.30 ▲0.0736.59 ▲1.99
MW Google Maps /wp-admin/options-general.php?page=mw-google-maps/system/mw_google_maps_admin_page.php3.2432.02

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

MW Google Maps: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,940 ▲20514.79 ▲0.3524.03 ▲22.0342.74 ▼0.03
Dashboard /wp-admin2,210 ▲224.84 ▼0.23107.31 ▼10.2437.99 ▼10.52
Posts /wp-admin/edit.php2,093 ▲42.00 ▲0.0039.83 ▲0.5934.12 ▼3.99
Add New Post /wp-admin/post-new.php1,517 ▼1617.69 ▼5.59683.57 ▲89.9854.93 ▼0.67
Media Library /wp-admin/upload.php1,395 ▲74.19 ▼0.0497.10 ▼7.4940.79 ▼3.08
MW Google Maps /wp-admin/options-general.php?page=mw-google-maps/system/mw_google_maps_admin_page.php8302.0523.1426.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=mw-google-maps/system/mw_google_maps_admin_page.php
    • > 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=mw-google-maps/system/mw_google_maps_admin_page.php
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=mw-google-maps/system/mw_google_maps_admin_page.php
    • > Notice in wp-content/plugins/mw-google-maps/system/mw_google_maps_admin_page.php+102
    Trying to access array offset on value of type bool
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=mw-google-maps/system/mw_google_maps_admin_page.php
    • > Notice in wp-content/plugins/mw-google-maps/system/mw_google_maps_admin_page.php+102
    Trying to access array offset on value of type null

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
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: Call to undefined function load_plugin_textdomain() in wp-content/plugins/mw-google-maps/mw-google-maps.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: route, map, googlemaps, google

mw-google-maps/mw-google-maps.php Passed 13 tests

The primary PHP file in "MW Google Maps" version 1.3.1 is used by WordPress to initiate all plugin functionality
50 characters long description:
MW Google Maps adds google maps in your post easy.

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
There were no executable files found in this plugin623 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP243150359
JavaScript12583211
PO File1131545
CSS1108

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.26
Average class complexity19.50
▷ Minimum class complexity18.00
▷ Maximum class complexity21.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods29.52%
▷ Public methods1885.71%
▷ Protected methods314.29%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected