84% magic-google-maps

Code Review | Magic Google Maps

WordPress plugin Magic Google Maps scored84%from 54 tests.

About plugin

  • Plugin page: magic-google-maps
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Jan 28, 2015
  • Latest release: Mar 9, 2015
  • Number of updates: 31
  • Update frequency: every 1.3 days
  • Top authors: Fengler (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /5,628 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.40ms] Passed 4 tests

An overview of server-side resources used by Magic Google Maps
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0336.87 ▲0.03
Dashboard /wp-admin3.33 ▼0.0244.76 ▼12.63
Posts /wp-admin/edit.php3.38 ▲0.0243.58 ▼4.09
Add New Post /wp-admin/post-new.php5.93 ▲0.0478.47 ▼11.96
Media Library /wp-admin/upload.php3.25 ▲0.0235.28 ▼0.93

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 15 new options
New WordPress options
widget_recent-posts
googlemapsCode
widget_theysaidso_widget
googlemapspinLng
enabledescription
height
placedescription
zoom
theysaidso_admin_options
can_compress_scripts
...

Browser metrics Passed 4 tests

Checking browser requirements for Magic Google Maps
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲4014.39 ▼0.017.00 ▲4.7642.07 ▲0.95
Dashboard /wp-admin2,203 ▲255.49 ▼0.2293.06 ▼21.2483.88 ▲46.03
Posts /wp-admin/edit.php2,120 ▲202.52 ▲0.5340.93 ▲4.1034.88 ▼0.03
Add New Post /wp-admin/post-new.php1,548 ▲1223.35 ▲0.23691.14 ▲10.8935.77 ▼24.71
Media Library /wp-admin/upload.php1,423 ▲235.03 ▲0.84103.11 ▲0.4070.63 ▲25.89

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • placedescription
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/magic-google-maps/magic-Maps.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (18 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

magic-google-maps/magic-Maps.php 92% from 13 tests

The primary PHP file in "Magic Google Maps" version 1.0.4 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("magic-google-maps.php" instead of "magic-Maps.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
Good job! No executable or dangerous file extensions detected343 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP24129276
JavaScript217964
CSS1003

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.02
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%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/Magic-maps.png1.69KB0.90KB▼ 47.02%