10% web-maps-for-wp

Code Review | Web Maps for WordPress

WordPress plugin Web Maps for WordPress scored10%from 54 tests.

About plugin

  • Plugin page: web-maps-for-wp
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9.3
  • WordPress version: 6.3.1
  • First release: Aug 19, 2013
  • Latest release: May 13, 2022
  • Number of updates: 57
  • Update frequency: every 56.0 days
  • Top authors: smccallgeojobe (64.91%)GEO-JobeGIS (36.84%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active /16,310 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/web-maps-for-wp/lib/AGOLForWP/Class/AGOLforWPOptions.php+1128
    Undefined index: std

Server metrics [RAM: ▲0.18MB] [CPU: ▼3.49ms] Passed 4 tests

This is a short check of server-side resources used by Web Maps for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1738.17 ▲1.83
Dashboard /wp-admin3.47 ▲0.1645.49 ▲2.07
Posts /wp-admin/edit.php3.58 ▲0.2244.16 ▼3.68
Add New Post /wp-admin/post-new.php6.38 ▲0.4982.57 ▼14.19
Media Library /wp-admin/upload.php3.39 ▲0.1637.39 ▲7.28

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 46 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
agolforwp_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Web Maps for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,961 ▲17516.68 ▲2.4717.10 ▲15.2736.51 ▼2.63
Dashboard /wp-admin2,218 ▲436.21 ▲0.50101.18 ▼1.1539.61 ▲0.77
Posts /wp-admin/edit.php2,135 ▲352.50 ▲0.4751.16 ▲14.6432.55 ▼0.65
Add New Post /wp-admin/post-new.php6,274 ▲4,74324.71 ▲1.61941.67 ▲269.0939.71 ▼12.75
Media Library /wp-admin/upload.php1,432 ▲324.39 ▲0.24107.98 ▲10.8747.48 ▲2.39

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • agolforwp_options
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP 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 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Tags: You are using too many tags: 21 tag instead of maximum 10
You can take inspiration from this readme.txt

web-maps-for-wp/agol-for-wp.php 85% from 13 tests

The principal PHP file in "Web Maps for WordPress" v. 1.5 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 371 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("web-maps-for-wp.php" instead of "agol-for-wp.php")

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
Good job! No executable or dangerous file extensions detected7,409 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript211,3983,3464,433
CSS68221261,646
PHP3856174906
Sass75981332
HTML19080
XML10012

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity39.00
▷ Minimum class complexity39.00
▷ Maximum class complexity39.00
Average method complexity3.92
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions1292.31%
▷ Anonymous functions17.69%
Constants0
▷ Global constants00.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
5 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/prev.png0.49KB0.33KB▼ 33.60%
assets/next.png0.50KB0.32KB▼ 36.15%
assets/icon-256x256.png21.10KB7.43KB▼ 64.80%
assets/icon-128x128.png10.27KB3.88KB▼ 62.23%
assets/ago_default.png36.81KB15.64KB▼ 57.52%