83% simple-google-static-map

Code Review | Simple Google Static Map

WordPress plugin Simple Google Static Map scored83%from 54 tests.

About plugin

  • Plugin page: simple-google-sta...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.1
  • WordPress version: 6.3.1
  • First release: Jan 23, 2011
  • Latest release: Dec 21, 2014
  • Number of updates: 9
  • Update frequency: every 158.9 days
  • Top authors: equisele (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /6,319 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: ▼11.77ms] Passed 4 tests

An overview of server-side resources used by Simple Google Static Map
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.89 ▲2.18
Dashboard /wp-admin3.31 ▼0.0449.99 ▼13.57
Posts /wp-admin/edit.php3.36 ▲0.0050.89 ▼8.38
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.35 ▼27.32
Media Library /wp-admin/upload.php3.23 ▲0.0044.79 ▲11.05

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

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

Browser metrics Passed 4 tests

Simple Google Static Map: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.21 ▼1.165.28 ▲3.5343.60 ▲1.37
Dashboard /wp-admin2,209 ▲244.86 ▼0.94103.00 ▲2.6040.32 ▼1.31
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0139.80 ▲5.0034.38 ▼1.03
Add New Post /wp-admin/post-new.php1,542 ▼022.75 ▲4.41646.08 ▼26.8053.09 ▼8.81
Media Library /wp-admin/upload.php1,382 ▼34.21 ▲0.0096.10 ▼5.2143.45 ▼0.86

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
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 take a closer look at 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_shortcode() in wp-content/plugins/simple-google-static-map/simplegmap.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: Please a description for screenshot #1 in simple-google-static-map/assets to your readme.txt
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === simple-google-static-map === )
You can look at the official readme.txt

simple-google-static-map/simplegmap.php 85% from 13 tests

The principal PHP file in "Simple Google Static Map" v. 1.0.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("simple-google-static-map.php" instead of "simplegmap.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 267 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin28 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP151228

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.30
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.13MB with 0.09MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot_01.png132.30KB41.93KB▼ 68.31%