10% lm-easy-maps

Code Review | LM Easy Maps

WordPress plugin LM Easy Maps scored10%from 54 tests.

About plugin

  • Plugin page: lm-easy-maps
  • Plugin version: 1.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.7
  • WordPress version: 6.3.1
  • First release: Nov 23, 2020
  • Latest release: Mar 16, 2021
  • Number of updates: 15
  • Update frequency: every 8.3 days
  • Top authors: leonardoboss (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /476 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/lm-easy-maps/includes/lm-easy-maps-widget.php+137
    Function create_function() is deprecated

Server metrics [RAM: ▼1.89MB] [CPU: ▼60.34ms] Passed 4 tests

Analyzing server-side resources used by LM Easy Maps
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.10 ▼1.365.32 ▼33.41
Dashboard /wp-admin2.12 ▼1.225.95 ▼55.65
Posts /wp-admin/edit.php2.12 ▼1.236.02 ▼47.37
Add New Post /wp-admin/post-new.php2.12 ▼3.765.88 ▼104.91
Media Library /wp-admin/upload.php2.12 ▼1.105.47 ▼26.86
Add new map /wp-admin/post-new.php?post_type=lm-easy-maps2.126.04
LM Easy Maps /wp-admin/edit.php?post_type=lm-easy-maps2.137.86

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

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

Browser metrics Passed 4 tests

LM Easy Maps: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8413.36 ▼1.025.24 ▲3.6243.85 ▲4.37
Dashboard /wp-admin2,236 ▲445.87 ▲0.89109.99 ▲3.5839.34 ▼3.81
Posts /wp-admin/edit.php2,116 ▲242.06 ▲0.0744.26 ▲2.7139.84 ▲3.55
Add New Post /wp-admin/post-new.php1,545 ▲2623.23 ▲0.11656.77 ▲23.3353.28 ▲3.11
Media Library /wp-admin/upload.php1,412 ▲214.25 ▲0.05102.12 ▲4.1441.03 ▼3.82
Add new map /wp-admin/post-new.php?post_type=lm-easy-maps1,9517.96152.16100.38
LM Easy Maps /wp-admin/edit.php?post_type=lm-easy-maps1,0971.9638.5133.21

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/lm-easy-maps/includes/lm-easy-maps-widget.php+137
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_lmeasymaps
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=lm-easy-maps
    • > POST request to /wp-admin/admin-ajax.php
    • > Deprecated in wp-content/plugins/lm-easy-maps/includes/lm-easy-maps-widget.php+137
    Function create_function() is deprecated
    • > GET request to /wp-admin/edit.php?post_type=lm-easy-maps
    • > Notice in wp-content/plugins/lm-easy-maps/includes/lm-easy-maps-menu.php+60
    Undefined variable: colunns
    • > GET request to /wp-admin/edit.php?post_type=lm-easy-maps
    • > Notice in wp-content/plugins/lm-easy-maps/includes/lm-easy-maps-menu.php+60
    Trying to access array offset on value of type null

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
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/lm-easy-maps/lm-easy-maps.php:12
    • > PHP Fatal error
      require_once(): Failed opening required 'LMEMAPS_INCLUDE_PATHlm-easy-maps-menu.php' (include_path='.:/usr/share/php') in wp-content/plugins/lm-easy-maps/includes/lm-easy-maps-functions.php on line 3
    • > PHP Warning
      require_once(LMEMAPS_INCLUDE_PATHlm-easy-maps-menu.php): failed to open stream: No such file or directory in wp-content/plugins/lm-easy-maps/includes/lm-easy-maps-functions.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lm-easy-maps/includes/lm-easy-maps-menu.php:41
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lm-easy-maps/includes/lm-easy-maps-widget.php:15
    • > PHP Warning
      Use of undefined constant LMEMAPS_INCLUDE_PATH - assumed 'LMEMAPS_INCLUDE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/lm-easy-maps/includes/lm-easy-maps-functions.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lm-easy-maps/includes/lm-easy-maps-save.php:39

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 Passed 29 tests

readme.txt Passed 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
6 plugin tags: generator, maps, google, easy, widget...

lm-easy-maps/lm-easy-maps.php Passed 13 tests

This is the main PHP file of "LM Easy Maps" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
47 characters long description:
Generatore di Mappe Google, shortcodes e widget

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected740 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP76943410
PO File4116120330

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity5.50
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin