84% mapcraft

Code Review | MapCraft - Google Maps Plugin

WordPress plugin MapCraft - Google Maps Plugin scored84%from 54 tests.

About plugin

  • Plugin page: mapcraft
  • Plugin version: 1.4.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.0.1
  • WordPress version: 6.3.1
  • First release: May 3, 2019
  • Latest release: Aug 8, 2022
  • Number of updates: 45
  • Update frequency: every 26.6 days
  • Top authors: webcraftplugins (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /3,971 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼11.88ms] Passed 4 tests

An overview of server-side resources used by MapCraft - Google Maps Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.17 ▼2.49
Dashboard /wp-admin3.33 ▼0.0153.95 ▼15.47
Posts /wp-admin/edit.php3.38 ▲0.0348.59 ▼6.67
Add New Post /wp-admin/post-new.php5.93 ▲0.0590.59 ▼22.88
Media Library /wp-admin/upload.php3.25 ▲0.0337.41 ▼1.16
MapCraft /wp-admin/plugins.php?page=MapCraft3.2536.10

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 61 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
mapcraft_key

Browser metrics Passed 4 tests

A check of browser resources used by MapCraft - Google Maps Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲4214.25 ▼0.101.99 ▲0.2029.93 ▼14.05
Dashboard /wp-admin2,212 ▲355.57 ▼0.17100.36 ▲9.7154.08 ▲11.43
Posts /wp-admin/edit.php2,114 ▲351.98 ▼0.0135.97 ▼4.0140.56 ▲5.78
Add New Post /wp-admin/post-new.php6,375 ▲4,84027.46 ▲9.27919.98 ▲251.5040.77 ▼26.80
Media Library /wp-admin/upload.php1,414 ▲144.23 ▲0.03100.60 ▼19.8156.06 ▲10.53
MapCraft /wp-admin/plugins.php?page=MapCraft8609.17271.5038.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • mapcraft_key
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/mapcraft/public/partials/mapcraft-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% 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:
  • Screenshots: These screenshots require images: #1 (2. Drawing markers, settings), #3 (Custom map styles), #4 (Drawing polygons, polylines, circles, rectangles), #5 (Store locator), #6 (Importing markers from CSV), #7 (Map customization)
You can look at the official readme.txt

mapcraft/mapcraft.php Passed 13 tests

This is the main PHP file of "MapCraft - Google Maps Plugin" version 1.4.10, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
45 characters long description:
Craft beautiful Google Maps for your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin19,761 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
SVG17209,656
CSS420229,453
PHP14199679391
JavaScript539124261

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity2.56
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods40
▷ Static methods410.00%
▷ Public methods3280.00%
▷ Protected methods25.00%
▷ Private methods615.00%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin