78% mapinco-easy-maps

Code Review | Mapinco Easy Maps

WordPress plugin Mapinco Easy Maps scored78%from 54 tests.

About plugin

  • Plugin page: mapinco-easy-maps
  • Plugin version: 0.3
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.0.2
  • WordPress version: 6.3.1
  • First release: Nov 13, 2017
  • Latest release: Sep 19, 2022
  • Number of updates: 18
  • Update frequency: every 98.5 days
  • Top authors: julienappert (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /868 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼4.30ms] Passed 4 tests

Server-side resources used by Mapinco Easy Maps
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1234.48 ▼5.16
Dashboard /wp-admin3.42 ▲0.1144.63 ▼1.67
Posts /wp-admin/edit.php3.54 ▲0.1747.52 ▲5.11
Add New Post /wp-admin/post-new.php6.00 ▲0.1182.18 ▼11.07
Media Library /wp-admin/upload.php3.35 ▲0.1135.35 ▲0.69

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 89 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Mapinco Easy Maps: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲19714.68 ▲0.2917.66 ▲15.8537.58 ▼12.13
Dashboard /wp-admin2,221 ▲335.91 ▲0.0295.98 ▼9.7042.28 ▼0.91
Posts /wp-admin/edit.php2,101 ▲92.03 ▲0.0440.14 ▲4.1035.91 ▲4.65
Add New Post /wp-admin/post-new.php1,535 ▲223.21 ▲0.09685.53 ▼31.1258.09 ▼0.96
Media Library /wp-admin/upload.php1,400 ▲154.28 ▲0.1097.50 ▼11.5844.16 ▼0.82

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/mapinco-easy-maps/easymaps.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mapinco-easy-maps/controllers/front/FrontMapsController.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mapinco-easy-maps/controllers/admin/AdminMapsController.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: map, google maps, openstreetmap, leaflet, leafletjs

mapinco-easy-maps/easymaps.php 85% from 13 tests

The entry point to "Mapinco Easy Maps" version 0.3 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mapinco-easy-maps.php" instead of "easymaps.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Everything looks great! No dangerous files found in this plugin2,675 lines of code in 78 files:
LanguageFilesBlank linesComment linesLines of code
CSS5120271,059
JavaScript66170102973
PHP35529496
PO File1222265
Markdown123055
JSON10026
SVG1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity15.00
▷ Minimum class complexity5.00
▷ Maximum class complexity24.00
Average method complexity3.08
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods15
▷ Static methods16.67%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants2
▷ Global constants2100.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
5 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/leaflet/images/marker-icon.png1.43KB1.55KB0.00%
inc/leaflet/images/layers.png0.68KB1.05KB0.00%
inc/leaflet/images/layers-2x.png1.23KB1.67KB0.00%
inc/leaflet/images/marker-icon-2x.png2.41KB2.52KB0.00%
inc/leaflet/images/marker-shadow.png0.60KB1.16KB0.00%