83% interactive-maps

Code Review | Simple Maps

WordPress plugin Simple Maps scored83%from 54 tests.

About plugin

  • Plugin page: interactive-maps
  • Plugin version: 0.98
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-6.0
  • WordPress version: 6.3.1
  • First release: Jan 21, 2013
  • Latest release: Jun 27, 2022
  • Number of updates: 63
  • Update frequency: every 54.7 days
  • Top authors: simplemaps (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active /31,029 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼10.72ms] Passed 4 tests

Analyzing server-side resources used by Simple Maps
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0050.36 ▲8.75
Dashboard /wp-admin3.31 ▲0.0148.16 ▼7.49
Posts /wp-admin/edit.php3.36 ▲0.0050.44 ▲1.57
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.98 ▼23.01
Media Library /wp-admin/upload.php3.23 ▲0.0035.47 ▼13.95
SimpleMaps /wp-admin/options-general.php?page=simplemaps3.2032.48

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Maps
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.72 ▲0.612.17 ▲0.3651.77 ▲8.62
Dashboard /wp-admin2,199 ▲195.61 ▼0.0989.34 ▲1.7540.20 ▼2.88
Posts /wp-admin/edit.php2,107 ▲72.02 ▲0.0138.98 ▼2.5435.53 ▼4.84
Add New Post /wp-admin/post-new.php1,538 ▲1018.55 ▼4.69632.27 ▼9.8363.74 ▲7.61
Media Library /wp-admin/upload.php1,407 ▲74.18 ▲0.0197.68 ▼7.7442.36 ▼7.77
SimpleMaps /wp-admin/options-general.php?page=simplemaps9172.1423.2130.94

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
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/interactive-maps/simplemaps.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

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
Please fix the following attributes:
  • Screenshots: A description for screenshot #2 is missing in interactive-maps/assets to your readme.txt
  • Tags: Please delete some tags, you are using 21 tag instead of maximum 10
The official readme.txt might help

interactive-maps/simplemaps.php 85% from 13 tests

"Simple Maps" version 0.98's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 205 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("interactive-maps.php" instead of "simplemaps.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
There were no executable files found in this plugin49 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP119949

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.49
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/screenshot.png47.80KB21.83KB▼ 54.35%