89% maps-for-wp

Code Review | Maps for WP

WordPress plugin Maps for WP scored89%from 54 tests.

About plugin

  • Plugin page: maps-for-wp
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.2.2
  • WordPress version: 6.3.1
  • First release: Apr 7, 2016
  • Latest release: Jul 15, 2023
  • Number of updates: 28
  • Update frequency: every 94.9 days
  • Top authors: icopydoc (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

600+ active /15,725 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Maps for WP
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0543.83 ▲1.66
Dashboard /wp-admin3.35 ▲0.0051.59 ▼15.49
Posts /wp-admin/edit.php3.44 ▲0.0852.29 ▲1.61
Add New Post /wp-admin/post-new.php5.93 ▲0.0495.96 ▲4.33
Media Library /wp-admin/upload.php3.25 ▲0.0237.73 ▲2.21

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 18 new options
New WordPress options
mfwp_map_from
mfwp_zoom_ManyPoints
can_compress_scripts
widget_recent-posts
mfwp_style_map
widget_theysaidso_widget
mfwp_gapikey
mfwp_center_lon_ManyPoints
mfwp_version
mfwp_type_map
...

Browser metrics Passed 4 tests

A check of browser resources used by Maps for WP
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,011 ▲25015.44 ▲1.1226.29 ▲24.6344.87 ▲6.20
Dashboard /wp-admin2,357 ▲1806.18 ▲0.61118.43 ▲26.4437.35 ▼1.41
Posts /wp-admin/edit.php2,285 ▲1823.37 ▲1.3551.87 ▲10.2234.26 ▼0.43
Add New Post /wp-admin/post-new.php1,547 ▲1923.24 ▲0.25641.68 ▲15.1737.12 ▼25.08
Media Library /wp-admin/upload.php1,425 ▲254.16 ▼0.0881.97 ▼20.9245.30 ▲0.65

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (screenshot-1.png) image required
Please take inspiration from this readme.txt

maps-for-wp/maps-for-wp.php 92% from 13 tests

This is the main PHP file of "Maps for WP" version 1.2.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.4.2" instead of "4.5")

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
Good job! No executable or dangerous file extensions detected1,232 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP450128859
JavaScript32653209
PO File17385149
CSS10015

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity54.50
▷ Minimum class complexity33.00
▷ Maximum class complexity76.00
Average method complexity8.13
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods16
▷ Static methods637.50%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions666.67%
▷ Anonymous functions333.33%
Constants13
▷ Global constants13100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.15MB with 0.08MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png145.11KB53.73KB▼ 62.97%
img/no-img.png8.75KB5.04KB▼ 42.45%
img/marker.png1.74KB0.76KB▼ 56.13%