89% responsive-vector-maps

Code Review | RVM - Responsive Vector Maps

WordPress plugin RVM - Responsive Vector Maps scored89%from 54 tests.

About plugin

  • Plugin page: responsive-vector...
  • Plugin version: 6.6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.1.1
  • WordPress version: 6.3.1
  • First release: Jul 23, 2014
  • Latest release: Mar 2, 2023
  • Number of updates: 193
  • Update frequency: every 16.3 days
  • Top authors: Enrico Urbinati (100%)

Code review

54 tests

User reviews

46 reviews

Install metrics

5,000+ active /101,165 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.46MB] [CPU: ▲0.64ms] Passed 4 tests

Server-side resources used by RVM - Responsive Vector Maps
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.4844.12 ▲2.27
Dashboard /wp-admin3.76 ▲0.4653.70 ▲4.93
Posts /wp-admin/edit.php3.88 ▲0.5254.72 ▲4.43
Add New Post /wp-admin/post-new.php6.35 ▲0.4692.23 ▼5.44
Media Library /wp-admin/upload.php3.69 ▲0.4640.81 ▲1.29
RVM global settings /wp-admin/options-general.php?page=rvm_options_page3.6843.14
RVM Maps /wp-admin/edit.php?post_type=rvm3.7341.92
Add New Map /wp-admin/post-new.php?post_type=rvm3.8354.29

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

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

Browser metrics Passed 4 tests

RVM - Responsive Vector Maps: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲14713.50 ▼0.618.67 ▲6.9342.65 ▲4.86
Dashboard /wp-admin2,229 ▲495.63 ▼0.0391.69 ▲6.0738.70 ▼3.45
Posts /wp-admin/edit.php2,134 ▲522.03 ▲0.0540.12 ▲2.6437.09 ▲2.64
Add New Post /wp-admin/post-new.php1,598 ▲7223.08 ▲0.11672.28 ▼40.8642.99 ▼11.48
Media Library /wp-admin/upload.php1,434 ▲374.20 ▲0.03104.11 ▼25.1545.03 ▼5.20
RVM global settings /wp-admin/options-general.php?page=rvm_options_page1,0463.0041.1925.92
RVM Maps /wp-admin/edit.php?post_type=rvm1,1121.9430.6430.59
Add New Map /wp-admin/post-new.php?post_type=rvm2,9128.22233.2688.32

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 8 options in the database
    • db_upgraded
    • widget_rvm_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • rvm_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (RVM once installed into Wordpress), #2 (**Main settings** : add padding, background and canvas colour and many more), #3 (**Subdivisions settings** : customise every single area of the map, add link, html popup label, background color and more), #4 (**Markers section** : add markers pinpoints using latitude and longitude, customise colors, size and borders), #5 (Use the Preview button to see map before going live), #6 (Use html popup label to add rich content to your markers and subdivisions), #7 (Premium maps purchasable on responsivemapsplugin.com)
The official readme.txt is a good inspiration

responsive-vector-maps/responsive_vector_maps.php 92% from 13 tests

The principal PHP file in "RVM - Responsive Vector Maps" v. 6.6.2 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 ("responsive-vector-maps.php" instead of "responsive_vector_maps.php")

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
Success! There were no dangerous files found in this plugin5,494 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP151924822,590
JavaScript7105921,158
PO File34978011,041
CSS31459705

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions61
▷ Named functions61100.00%
▷ Anonymous functions00.00%
Constants37
▷ Global constants37100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
20 PNG files occupy 1.13MB with 0.60MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/green-check4.png17.67KB5.70KB▼ 67.76%
images/france-map-replacement.png85.44KB38.56KB▼ 54.87%
images/belgium-map-replacement.png55.72KB25.26KB▼ 54.66%
images/warning-icon.png4.73KB3.03KB▼ 35.94%
images/switzerland-map-replacement.png73.82KB34.59KB▼ 53.14%