78% embed-google-map

Code Review | Embed Google Map

WordPress plugin Embed Google Map scored78%from 54 tests.

About plugin

  • Plugin page: embed-google-map
  • Plugin version: 3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0.1
  • WordPress version: 6.3.1
  • First release: Dec 13, 2012
  • Latest release: Dec 6, 2014
  • Number of updates: 21
  • Update frequency: every 34.4 days
  • Top authors: petkivim (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

1,000+ active /33,704 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
Installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼9.95ms] Passed 4 tests

Server-side resources used by Embed Google Map
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1645.38 ▲4.82
Dashboard /wp-admin3.48 ▲0.1344.08 ▼15.14
Posts /wp-admin/edit.php3.59 ▲0.2346.67 ▼6.21
Add New Post /wp-admin/post-new.php6.06 ▲0.1782.27 ▼23.26
Media Library /wp-admin/upload.php3.40 ▲0.1736.07 ▲5.57

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Embed Google Map
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.12 ▼0.231.68 ▲0.0442.06 ▲3.44
Dashboard /wp-admin2,196 ▲155.53 ▼0.2181.12 ▼37.5740.35 ▼11.42
Posts /wp-admin/edit.php2,104 ▲12.03 ▲0.0333.09 ▼7.3342.40 ▲4.82
Add New Post /wp-admin/post-new.php1,532 ▲423.86 ▲0.76588.80 ▼40.4149.23 ▲0.86
Media Library /wp-admin/upload.php1,401 ▲74.26 ▲0.11102.98 ▲4.6147.54 ▲4.76
Embed Google Map /wp-admin/embed_google_map.php260.420.0912.11

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/embed-google-map/embed_google_map.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/embed_google_map.php
    • > Network (severe)
    wp-admin/embed_google_map.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: map, map type, zoom level, location, map size...

embed-google-map/embed_google_map.php 92% from 13 tests

The main file in "Embed Google Map" v. 3.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("embed-google-map.php" instead of "embed_google_map.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin824 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP312266820
HTML1004

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity10.14
▷ Minimum class complexity3.00
▷ Maximum class complexity29.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes114.29%
▷ Concrete classes685.71%
▷ Final classes00.00%
Methods48
▷ Static methods12.08%
▷ Public methods4389.58%
▷ Protected methods36.25%
▷ Private methods24.17%
Functions8
▷ Named functions8100.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
PNG images were not found in this plugin