84% wp-web-maps

Code Review | WP Web Maps

WordPress plugin WP Web Maps scored84%from 54 tests.

About plugin

  • Plugin page: wp-web-maps
  • Plugin version: 0.2.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.4.2
  • WordPress version: 6.3.1
  • First release: Aug 10, 2020
  • Latest release: Aug 14, 2020
  • Number of updates: 7
  • Update frequency: every 1.0 days
  • Top authors: pjhooker (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /543 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.08MB] [CPU: ▼9.03ms] Passed 4 tests

An overview of server-side resources used by WP Web Maps
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.0741.38 ▼0.92
Dashboard /wp-admin3.71 ▲0.0851.19 ▼22.17
Posts /wp-admin/edit.php3.76 ▲0.0850.69 ▼5.15
Add New Post /wp-admin/post-new.php6.31 ▲0.1690.58 ▼7.89
Media Library /wp-admin/upload.php3.57 ▲0.0844.07 ▲4.80
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=webmaps3.5638.88
Web Maps /wp-admin/edit.php?post_type=webmaps3.6240.06
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=webmaps3.5641.30
Add New /wp-admin/post-new.php?post_type=webmaps6.3087.42

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
category_children

Browser metrics Passed 4 tests

A check of browser resources used by WP Web Maps
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲5314.25 ▼0.121.94 ▲0.0143.20 ▼2.08
Dashboard /wp-admin2,245 ▲655.64 ▼0.0285.02 ▼4.6341.81 ▼3.31
Posts /wp-admin/edit.php2,150 ▲472.05 ▲0.0036.05 ▼6.8530.58 ▼8.83
Add New Post /wp-admin/post-new.php1,570 ▲3923.54 ▲0.40652.17 ▲13.1353.19 ▼2.26
Media Library /wp-admin/upload.php1,450 ▲474.19 ▼0.07100.52 ▼5.3748.59 ▲4.07
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=webmaps1,3662.1427.1330.80
Web Maps /wp-admin/edit.php?post_type=webmaps1,1661.9631.2230.53
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=webmaps1,5052.1834.8437.44
Add New /wp-admin/post-new.php?post_type=webmaps6,22319.32912.7337.42

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • category_children
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

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
Good news, no errors were detected

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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-web-maps/wp-web-maps.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/wp-web-maps/templates/tmplt_geojson.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: openstreetmap, mobile, gis, map, leafletjs...

wp-web-maps/wp-web-maps.php Passed 13 tests

The entry point to "WP Web Maps" version 0.2.2 is a PHP file that has certain tags in its header comment area
68 characters long description:
A plugin for creating a interactive Leaflet JS map with a shortcode.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin1,273 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
CSS15324563
JavaScript77857374
PHP351112300
Markdown210036

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity12.50
▷ Minimum class complexity3.00
▷ Maximum class complexity22.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/images/marker-icon.png1.43KB1.55KB0.00%
vendor/images/marker-shadow.png0.60KB1.16KB0.00%