71% eino-tuominens-google-maps

Code Review | Eino Tuominen's google maps

WordPress plugin Eino Tuominen's google maps scored71%from 54 tests.

About plugin

  • Plugin page: eino-tuominens-go...
  • Plugin version: 0.0 Alpha...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-3.8
  • WordPress version: 6.3.1
  • First release: Mar 3, 2014
  • Latest release: Mar 3, 2014
  • Number of updates: 3
  • Update frequency: every 1.0 days
  • Top authors: eino (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /849 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Eino Tuominen's google maps
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.02 ▼7.32
Dashboard /wp-admin3.31 ▲0.0149.21 ▲2.71
Posts /wp-admin/edit.php3.36 ▲0.0144.02 ▼3.08
Add New Post /wp-admin/post-new.php5.89 ▲0.01102.95 ▲10.57
Media Library /wp-admin/upload.php3.24 ▲0.0135.43 ▲2.37
ET's Google Maps /wp-admin/options-general.php?page=etgm-options3.1829.28

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Eino Tuominen's google maps
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲10114.03 ▼0.3720.98 ▲19.0839.51 ▼6.76
Dashboard /wp-admin2,213 ▲224.85 ▼0.07102.24 ▼2.5837.85 ▼6.50
Posts /wp-admin/edit.php2,093 ▲72.03 ▲0.0233.05 ▼4.0732.74 ▲0.35
Add New Post /wp-admin/post-new.php1,536 ▲323.04 ▼0.23570.55 ▼97.1949.04 ▼11.14
Media Library /wp-admin/upload.php1,395 ▲74.20 ▼0.0997.66 ▼4.1541.61 ▼3.19
ET's Google Maps /wp-admin/options-general.php?page=etgm-options8332.4448.7427.45

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=etgm-options
    • > Notice in wp-content/plugins/eino-tuominens-google-maps/eino-tuominen-google-maps.php+134
    Trying to access array offset on value of type bool

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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/eino-tuominens-google-maps/eino-tuominen-google-maps.php:22

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=etgm-options
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?libraries=drawing&sensor=false&ver=6.3.1 213:51 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"
    • > GET request to /wp-admin/options-general.php?page=etgm-options
    • > Console-api (warning) in unknown
    https://maps.googleapis.com/maps/api/js?libraries=drawing&sensor=false&ver=6.3.1 142:311 "google.maps.event.addDomListener() is deprecated, use the standard\naddEventListener() method instead:\nhttps://developer.mozilla.org/docs/Web/API/EventTarget/addEventListener\nThe feature will continue to work and there is no plan to decommission\nit."

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Donate link: Invalid url: ""
  • Contributors: Please add at least on tag
  • Contributors: Plugin contributors field is missing
The official readme.txt might help

eino-tuominens-google-maps/eino-tuominen-google-maps.php 85% from 13 tests

Analyzing the main PHP file in "Eino Tuominen's google maps" version 0.0 Alpha...
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("eino-tuominens-google-maps.php" instead of "eino-tuominen-google-maps.php")
  • Version: The version number should only use digits and periods (ex. "1.0.3" instead of "0.0 Alpha...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected467 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript218321335
PHP1623393
CSS17139

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.95MB with 0.62MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png976.34KB338.83KB▼ 65.30%