72% colour-smooth-maps

Code Review | Smooth Maps

WordPress plugin Smooth Maps scored 72% from 54 tests.

About plugin

  • Plugin page: colour-smooth-maps
  • Plugin version: 1.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.6
  • WordPress version: 6.3.1
  • First release: Jan 31, 2020
  • Latest release: Jan 13, 2021
  • Number of updates: 14
  • Update frequency: every 24.9 days
  • Top authors: wojciechborowicz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 541 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.37ms] Passed 4 tests

Analyzing server-side resources used by Smooth Maps
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.93 ▲0.08
Dashboard /wp-admin3.34 ▲0.0347.25 ▼0.82
Posts /wp-admin/edit.php3.39 ▲0.0345.82 ▼3.72
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.71 ▼9.02
Media Library /wp-admin/upload.php3.26 ▲0.0336.08 ▲1.11
Add New /wp-admin/post-new.php?post_type=smoothmaps3.1234.34
Smooth Maps /wp-admin/edit.php?post_type=smoothmaps3.3033.67
Settings /wp-admin/edit.php?post_type=smoothmaps&page=smooth-maps-setttings3.2028.48

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Smooth Maps
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲10313.16 ▼1.211.70 ▼0.0344.47 ▲2.73
Dashboard /wp-admin2,241 ▲535.87 ▼0.0493.86 ▼15.1838.71 ▲1.02
Posts /wp-admin/edit.php2,124 ▲322.02 ▼0.0333.99 ▼6.3834.79 ▼1.15
Add New Post /wp-admin/post-new.php1,558 ▲2523.38 ▲0.21669.14 ▲91.7255.74 ▲3.75
Media Library /wp-admin/upload.php1,423 ▲324.18 ▲0.0293.64 ▼3.9541.16 ▼1.46
Add New /wp-admin/post-new.php?post_type=smoothmaps1,7283.5760.0261.50
Smooth Maps /wp-admin/edit.php?post_type=smoothmaps1,0961.9630.4528.41
Settings /wp-admin/edit.php?post_type=smoothmaps&page=smooth-maps-setttings8201.8424.0325.93

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/post-new.php?post_type=smoothmaps
    • > Notice in wp-content/plugins/colour-smooth-maps/smoothmaps.php+321
    Undefined index: smoothMaps-type
    • > GET request to /wp-admin/post-new.php?post_type=smoothmaps
    • > Notice in wp-content/plugins/colour-smooth-maps/smoothmaps.php+322
    Undefined index: smoothMapsIframe-address
    • > GET request to /wp-admin/post-new.php?post_type=smoothmaps
    • > Notice in wp-content/plugins/colour-smooth-maps/smoothmaps.php+324
    Undefined index: smoothMaps-address
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=smoothmaps
    • > Notice in wp-content/plugins/colour-smooth-maps/smoothmaps.php+386
    Undefined index: smoothMaps-zoom
    • > GET request to /wp-admin/post-new.php?post_type=smoothmaps
    • > Notice in wp-content/plugins/colour-smooth-maps/smoothmaps.php+339
    Undefined index: smoothMaps-width
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=smoothmaps
    • > Notice in wp-content/plugins/colour-smooth-maps/smoothmaps.php+392
    Undefined index: smoothMaps-height
    • > GET request to /wp-admin/post-new.php?post_type=smoothmaps
    • > Notice in wp-content/plugins/colour-smooth-maps/smoothmaps.php+351
    Undefined index: smoothMaps-style
    • > GET request to /wp-admin/post-new.php?post_type=smoothmaps
    • > Notice in wp-content/plugins/colour-smooth-maps/smoothmaps.php+352
    Undefined index: smoothMaps-hide
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=smoothmaps
    • > Notice in wp-content/plugins/colour-smooth-maps/smoothmaps.php+556
    Trying to access array offset on value of type null
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=smoothmaps
    • > Warning in wp-content/plugins/colour-smooth-maps/smoothmaps.php+563
    Invalid argument supplied for foreach()
    • > GET request to /wp-admin/post-new.php?post_type=smoothmaps
    • > Notice in wp-content/plugins/colour-smooth-maps/smoothmaps.php+275
    Uninitialized string offset: 0
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=smoothmaps&page=smooth-maps-setttings
    • > Notice in wp-content/plugins/colour-smooth-maps/smoothmaps.php+113
    Trying to access array offset on value of type bool
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=smoothmaps
    • > Notice in wp-content/plugins/colour-smooth-maps/smoothmaps.php+563
    Undefined variable: resultsLat
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=smoothmaps
    • > Notice in wp-content/plugins/colour-smooth-maps/smoothmaps.php+556
    Undefined variable: resultsLong
    • > GET request to /wp-admin/post-new.php?post_type=smoothmaps
    • > Notice in wp-content/plugins/colour-smooth-maps/smoothmaps.php+560
    Undefined variable: styles
    • > GET request to /wp-admin/post-new.php?post_type=smoothmaps
    • > Notice in wp-content/plugins/colour-smooth-maps/smoothmaps.php+560
    Undefined variable: hide_busineeses
    • > GET request to /wp-admin/post-new.php?post_type=smoothmaps
    • > Notice in wp-content/plugins/colour-smooth-maps/smoothmaps.php+569
    Undefined variable: markers

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/colour-smooth-maps/smoothmaps.php:30

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/post-new.php?post_type=smoothmaps
    • > Javascript (severe) in unknown
    /wp-admin/post-new.php?post_type=smoothmaps 486:25 Uncaught SyntaxError: Unexpected token ','
    • > GET request to /wp-admin/post-new.php?post_type=smoothmaps
    • > Javascript (severe) in unknown
    http://maps.google.com/maps/api/js?key=&callback=smoothMaps_initMap 128:470 Uncaught Raa: smoothMaps_initMap is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
Please take inspiration from this readme.txt

colour-smooth-maps/smoothmaps.php 92% from 13 tests

This is the main PHP file of "Smooth 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 take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("colour-smooth-maps.php" instead of "smoothmaps.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
No dangerous file extensions were detected559 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP112132459
JavaScript117665
CSS15535

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions18
▷ Named functions18100.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
No PNG files were detected