10% nokia-mapsplaces

Code Review | Nokia Maps & Places

WordPress plugin Nokia Maps & Places scored10%from 54 tests.

About plugin

  • Plugin page: nokia-mapsplaces
  • Plugin version: 1.7.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Nov 23, 2011
  • Latest release: Jan 7, 2015
  • Number of updates: 158
  • Update frequency: every 7.2 days
  • Top authors: radek.adamczyk (46.84%)time4ostry (24.05%)Skowron (18.35%)marekkrysiuk (10.13%)DeSmart (3.16%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /8,255 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/nokia-mapsplaces/widget.php+9
    Methods with the same name as their class will not be constructors in a future version of PHP; NokiaMapsPlacesWidget has a deprecated constructor

Server metrics [RAM: ▼1.91MB] [CPU: ▼48.80ms] Passed 4 tests

A check of server-side resources used by Nokia Maps & Places
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.385.00 ▼32.46
Dashboard /wp-admin2.11 ▼1.205.29 ▼38.61
Posts /wp-admin/edit.php2.11 ▼1.264.93 ▼39.20
Add New Post /wp-admin/post-new.php2.11 ▼3.795.61 ▼84.91
Media Library /wp-admin/upload.php2.11 ▼1.135.42 ▼31.70

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 50 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_nokiamapsplaceswidget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Nokia Maps & Places
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,893 ▲13213.51 ▼1.159.98 ▲8.2543.01 ▲6.61
Dashboard /wp-admin2,209 ▲315.51 ▼0.2183.55 ▼18.6639.09 ▼1.83
Posts /wp-admin/edit.php2,118 ▲212.02 ▲0.0235.49 ▲0.6535.95 ▲2.45
Add New Post /wp-admin/post-new.php1,545 ▲1922.87 ▼0.42679.32 ▼19.0561.72 ▲4.76
Media Library /wp-admin/upload.php1,420 ▲174.14 ▲0.0295.79 ▼4.4342.84 ▼0.64

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/nokia-mapsplaces/widget.php+9
    Methods with the same name as their class will not be constructors in a future version of PHP; NokiaMapsPlacesWidget has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_nokiamapsplaceswidget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nokia-mapsplaces/widget.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function nokiaplaces_url() in wp-content/plugins/nokia-mapsplaces/tinymce/tinymce.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nokia-mapsplaces/widget.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Nokia Maps & Places button in Upload/Insert section of Add New Post), #2 (Place search with suggestion list), #3 (Search results), #4 (Customize your map), #5 (Nokia Maps & Places widget in a post), #6 (Shortcode example), #7 (Select any place with right-click and use it in your widget), #8 (Use any place and customize place name), #9 (Include Nokia Maps Traffic into your place widgets), #10 (Show public transport information in a widget)
You can take inspiration from this readme.txt

nokia-mapsplaces/nokia-mapsplaces.php Passed 13 tests

The main PHP file in "Nokia Maps & Places" ver. 1.7.0 adds more information about the plugin and also serves as the entry point for this plugin
82 characters long description:
With this plugin you are able to add a places and addresses into a post or a page.

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
Good job! No executable or dangerous file extensions detected3,178 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4184921,142
CSS511475985
SVG100638
PHP59399391
HTML10122

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity4.50
▷ Minimum class complexity4.00
▷ Maximum class complexity5.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
27 PNG files occupy 1.38MB with 0.44MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
page/images/nokiaLogo.png0.53KB0.56KB0.00%
screenshot-2.png334.77KB127.37KB▼ 61.95%
screenshot-10.png113.29KB66.53KB▼ 41.27%
page/images/ie6/borderTopCenter.png0.15KB0.19KB0.00%
screenshot-6.png29.52KB13.39KB▼ 54.65%