68% simple-map

Code Review | Simple Map

WordPress plugin Simple Map scored 68% from 54 tests.

About plugin

  • Plugin page: simple-map
  • Plugin version: 4.9.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.9
  • WordPress version: 6.3.1
  • First release: Jun 7, 2012
  • Latest release: Mar 11, 2018
  • Number of updates: 75
  • Update frequency: every 28.0 days
  • Top authors: miyauchi (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

20,000+ active / 328,200 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼1.20MB] [CPU: ▼42.06ms] Passed 4 tests

Analyzing server-side resources used by Simple Map
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.78 ▼0.6813.48 ▼28.20
Dashboard /wp-admin2.81 ▼0.4916.38 ▼32.57
Posts /wp-admin/edit.php2.81 ▼0.5416.47 ▼30.96
Add New Post /wp-admin/post-new.php2.81 ▼3.0719.50 ▼76.51
Media Library /wp-admin/upload.php2.81 ▼0.4117.62 ▼14.10
Simple Map /wp-admin/options-general.php?page=simple_map2.8216.22

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Map
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲11213.21 ▼1.101.86 ▲0.1137.82 ▼4.70
Dashboard /wp-admin2,222 ▲315.79 ▲0.8896.89 ▼6.8740.56 ▼4.31
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0236.38 ▼13.5934.43 ▼4.00
Add New Post /wp-admin/post-new.php1,552 ▲3823.41 ▲5.86652.36 ▼20.3553.02 ▼7.35
Media Library /wp-admin/upload.php1,407 ▲194.26 ▲0.00109.18 ▼4.0548.15 ▼0.26
Simple Map /wp-admin/options-general.php?page=simple_map8302.0226.4527.68

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/simple-map/simple-map.php+272
    Trying to access array offset on value of type bool
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple_map
    • > Notice in wp-content/plugins/simple-map/simple-map.php+272
    Trying to access array offset on value of type bool

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 trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-map/simple-map.php:69

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: address, google maps, shortcode, map

simple-map/simple-map.php Passed 13 tests

Analyzing the main PHP file in "Simple Map" version 4.9.0
39 characters long description:
Insert google map convert from address.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected448 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP285112290
JavaScript2612112
PO File1182046

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1588.24%
▷ Protected methods00.00%
▷ Private methods211.76%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.32MB with 0.21MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/004.png71.13KB26.77KB▼ 62.37%
images/003.png56.00KB24.12KB▼ 56.93%
images/001.png112.79KB31.30KB▼ 72.25%
images/002.png89.42KB31.65KB▼ 64.61%