78% mage-google-maps

Code Review | Mage Google Maps

WordPress plugin Mage Google Maps scored 78% from 54 tests.

About plugin

  • Plugin page: mage-google-maps
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.7
  • WordPress version: 5.8.1
  • First release: Jan 13, 2014
  • Latest release: Apr 15, 2017
  • Number of updates: 24
  • Update frequency: every 49.6 days
  • Top authors: Maximilian Ruthe (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 7,188 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.04MB] [CPU: ▼177.58ms] Passed 4 tests

A check of server-side resources used by Mage Google Maps
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.0325.33 ▼2.00
Dashboard /wp-admin3.11 ▲0.0435.44 ▼6.71
Posts /wp-admin/edit.php3.16 ▲0.0537.02 ▲1.63
Add New Post /wp-admin/post-new.php5.47 ▲0.0376.37 ▼702.02
Media Library /wp-admin/upload.php3.05 ▲0.0527.03 ▲0.42
Maps /wp-admin/admin.php?page=mage_maps3.0445.92
Dashboard /wp-admin/admin.php?page=mage_cast3.0123.85

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 221 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Mage Google Maps
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,732 ▲13116.82 ▲0.7413.32 ▲8.2475.69 ▼2.31
Dashboard /wp-admin2,964 ▲656.11 ▼0.04114.32 ▼16.44193.39 ▲21.80
Posts /wp-admin/edit.php2,767 ▲613.24 ▲0.0165.74 ▲3.15132.25 ▼7.58
Add New Post /wp-admin/post-new.php3,756 ▼5718.87 ▼0.01440.41 ▼5.05188.47 ▲28.70
Media Library /wp-admin/upload.php1,777 ▲255.58 ▲0.07126.67 ▼19.98197.15 ▲14.39
Maps /wp-admin/admin.php?page=mage_maps2,0643.3361.99179.87
Dashboard /wp-admin/admin.php?page=mage_cast1,1273.0759.39104.54

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
  • Zombie WordPress options detected upon uninstall: 1 option
    • mage_maps

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 37 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mage_cast
    • > Warning in wp-content/plugins/mage-google-maps/core/mage-cast.php+199
    preg_replace(): Compilation failed: invalid range in character class at offset 13

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
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/mage-google-maps/core/mage-cast.php:31

User-side errors Passed 1 test

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


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: Too many tags (25 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

mage-google-maps/mage-google-maps.php 92% from 13 tests

The main PHP file in "Mage Google Maps" ver. 1.1.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/lang/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected12,192 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity18.50
▷ Minimum class complexity4.00
▷ Maximum class complexity33.00
Average method complexity5.38
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions66100.00%
▷ Anonymous functions00.00%
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
195 compressed PNG files occupy 0.30MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings