78% simple-google-maps-into-posts

Code Review | Simple Google Maps

WordPress plugin Simple Google Maps scored78%from 54 tests.

About plugin

  • Plugin page: simple-google-map...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-4.4.2
  • WordPress version: 6.3.1
  • First release: Apr 1, 2016
  • Latest release: Jul 10, 2016
  • Number of updates: 4
  • Update frequency: every 25.3 days
  • Top authors: phpawy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /835 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.33MB] [CPU: ▼22.75ms] Passed 4 tests

A check of server-side resources used by Simple Google Maps
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0339.24 ▼4.37
Dashboard /wp-admin3.31 ▼0.0348.55 ▼23.44
Posts /wp-admin/edit.php3.36 ▲0.0149.75 ▲1.76
Add New Post /wp-admin/post-new.php4.60 ▼1.2845.07 ▼59.16
Media Library /wp-admin/upload.php3.24 ▲0.0132.82 ▼4.03

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Simple Google Maps
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.28 ▼0.071.80 ▲0.0945.62 ▲2.18
Dashboard /wp-admin2,202 ▲225.63 ▲0.0391.14 ▲2.3040.94 ▲3.95
Posts /wp-admin/edit.php2,104 ▲12.01 ▲0.0135.96 ▼4.7333.63 ▼1.95
Add New Post /wp-admin/post-new.php6,353 ▲4,82526.04 ▲2.67876.29 ▲272.2054.18 ▼2.78
Media Library /wp-admin/upload.php1,404 ▲44.17 ▼0.0295.12 ▼13.3642.43 ▼2.15
Simple Google Maps /wp-admin/sgm-plugin.php260.420.1013.91

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-google-maps-into-posts/simple-google-maps.php:162

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/sgm-plugin.php
    • > Network (severe)
    wp-admin/sgm-plugin.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

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
2 plugin tags: posts, googlemaps

simple-google-maps-into-posts/simple-google-maps.php 92% from 13 tests

This is the main PHP file of "Simple Google Maps" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-google-maps-into-posts.php" instead of "simple-google-maps.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin121 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12224121

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin