10% lm-easy-slider

Code Review | LM Easy Slider

WordPress plugin LM Easy Slider scored10%from 54 tests.

About plugin

  • Plugin page: lm-easy-slider
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.7
  • WordPress version: 6.3.1
  • First release: Dec 22, 2020
  • Latest release: Mar 16, 2021
  • Number of updates: 5
  • Update frequency: every 16.8 days
  • Top authors: leonardoboss (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /674 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/lm-easy-slider/includes/lm-easy-slider-widget.php+111
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼54.26ms] Passed 4 tests

An overview of server-side resources used by LM Easy Slider
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.00 ▼37.64
Dashboard /wp-admin2.05 ▼1.265.90 ▼42.62
Posts /wp-admin/edit.php2.05 ▼1.315.56 ▼39.88
Add New Post /wp-admin/post-new.php2.05 ▼3.845.72 ▼96.91
Media Library /wp-admin/upload.php2.05 ▼1.185.88 ▼30.23
LM Easy Slider /wp-admin/edit.php?post_type=lm-easy-slider2.055.21
Add new slider /wp-admin/post-new.php?post_type=lm-easy-slider2.056.53

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 25 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_lmeasyslider

Browser metrics Passed 4 tests

This is an overview of browser requirements for LM Easy Slider
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,945 ▲21013.86 ▼0.437.32 ▲5.5049.82 ▲3.25
Dashboard /wp-admin2,239 ▲484.87 ▼0.00109.32 ▲4.8139.29 ▼2.77
Posts /wp-admin/edit.php2,122 ▲332.04 ▲0.0140.83 ▲3.6236.51 ▲5.51
Add New Post /wp-admin/post-new.php1,559 ▲3123.20 ▲4.86688.44 ▲39.0967.32 ▲5.56
Media Library /wp-admin/upload.php1,418 ▲304.34 ▲0.1396.07 ▼4.3345.16 ▲0.72
LM Easy Slider /wp-admin/edit.php?post_type=lm-easy-slider1,1061.9434.4235.33
Add new slider /wp-admin/post-new.php?post_type=lm-easy-slider1,8013.6162.2537.20

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/lm-easy-slider/includes/lm-easy-slider-widget.php+111
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_lmeasyslider
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=lm-easy-slider
    • > Deprecated in wp-content/plugins/lm-easy-slider/includes/lm-easy-slider-widget.php+111
    Function create_function() is deprecated
    • > GET request to /wp-admin/edit.php?post_type=lm-easy-slider
    • > Notice in wp-content/plugins/lm-easy-slider/includes/lm-easy-slider-menu.php+73
    Undefined variable: colunns
    • > GET request to /wp-admin/edit.php?post_type=lm-easy-slider
    • > Notice in wp-content/plugins/lm-easy-slider/includes/lm-easy-slider-menu.php+73
    Trying to access array offset on value of type null

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/lm-easy-slider/includes/lm-easy-slider-opzioni.php
    • > /wp-content/plugins/lm-easy-slider/includes/lm-easy-slider-modifica.php
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lm-easy-slider/includes/lm-easy-slider-save.php:154
    • > PHP Warning
      Use of undefined constant LMESLIDER_INCLUDE_PATH - assumed 'LMESLIDER_INCLUDE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/lm-easy-slider/includes/lm-easy-slider-functions.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/lm-easy-slider/lm-easy-slider.php:12
    • > PHP Fatal error
      require_once(): Failed opening required 'LMESLIDER_INCLUDE_PATHlm-easy-slider-menu.php' (include_path='.:/usr/share/php') in wp-content/plugins/lm-easy-slider/includes/lm-easy-slider-functions.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lm-easy-slider/includes/lm-easy-slider-menu.php:41
    • > PHP Warning
      require_once(LMESLIDER_INCLUDE_PATHlm-easy-slider-menu.php): failed to open stream: No such file or directory in wp-content/plugins/lm-easy-slider/includes/lm-easy-slider-functions.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lm-easy-slider/includes/lm-easy-slider-widget.php:15
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/lm-easy-slider/front-end/slider.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt is a good inspiration

lm-easy-slider/lm-easy-slider.php 92% from 13 tests

"LM Easy Slider" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder was not found ("/languages")

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
Everything looks great! No dangerous files found in this plugin1,003 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP816163838
CSS4222127
XML40031
JavaScript31357

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity5.50
▷ Minimum method complexity1.00
▷ Maximum method complexity11.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%
Functions20
▷ Named functions20100.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