10% len-slider

Code Review | Len Slider

WordPress plugin Len Slider scored10%from 54 tests.

About plugin

  • Plugin page: len-slider
  • Plugin version: 2.0.11
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.5.1
  • WordPress version: 6.3.1
  • First release: Nov 20, 2012
  • Latest release: May 4, 2013
  • Number of updates: 81
  • Update frequency: every 2.0 days
  • Top authors: tigusigalpa (100%)

Code review

54 tests

User reviews

24 reviews

Install metrics

300+ active /101,681 total downloads

Benchmarks

Plugin footprint 22% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure had errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in LenSlider_Widget is deprecated since version 4.3.0! Use __construct() instead.

Server metrics [RAM: ▼0.29MB] [CPU: ▼48.52ms] Passed 4 tests

An overview of server-side resources used by Len Slider
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2413.03 ▼29.11
Dashboard /wp-admin3.72 ▲0.4113.81 ▼34.22
Posts /wp-admin/edit.php3.72 ▲0.3614.54 ▼37.63
Add New Post /wp-admin/post-new.php3.72 ▼2.1713.44 ▼93.12
Media Library /wp-admin/upload.php3.72 ▲0.4915.54 ▼16.20
Add/Edit Slider /wp-admin/admin.php?page=lenslider-slider-page3.7214.37
Sliders /wp-admin/admin.php?page=len-slider/ls-index.php3.7217.58
Skins /wp-admin/admin.php?page=lenslider-skins-page3.7214.55
Settings /wp-admin/admin.php?page=lenslider-settings-page3.7213.34

Server storage [IO: ▲2.95MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
It is recommended to fix the following issues
  • The plugin illegally modified 1 file (0.00KB) outside of "wp-content/plugins/len-slider/" and "wp-content/uploads/"
    • (new file) wp-content/lenslider-custom-skins/.empty
Filesystem: 186 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_lenslider_widget
can_compress_scripts
lenslider_settings
db_upgraded
widget_theysaidso_widget
lenslider_banners
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Len Slider
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,884 ▲14913.37 ▼1.221.92 ▼0.0643.70 ▼6.95
Dashboard /wp-admin2,272 ▲844.92 ▲0.06111.45 ▼1.4593.47 ▲48.87
Posts /wp-admin/edit.php2,175 ▲862.30 ▲0.1647.06 ▲2.8637.10 ▲1.77
Add New Post /wp-admin/post-new.php1,730 ▲18824.61 ▲6.33637.23 ▲1.3136.73 ▼37.61
Media Library /wp-admin/upload.php1,469 ▲844.30 ▲0.0993.23 ▼8.1767.96 ▲25.28
Add/Edit Slider /wp-admin/admin.php?page=lenslider-slider-page1,1063.6548.2827.45
Sliders /wp-admin/admin.php?page=len-slider/ls-index.php1,4283.7456.6735.80
Skins /wp-admin/admin.php?page=lenslider-skins-page1,2643.5650.5343.13
Settings /wp-admin/admin.php?page=lenslider-settings-page1,2353.7057.0334.31

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in LenSlider_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • This plugin has failed uninstalling correctly, leaving 186 files (2.95MB) in the plugin directory
    • (new file) css/ls_admin.css
    • (new file) css/defaultskin.css
    • (new file) css/jquery.mCustomScrollbar.css
    • (new file) css/PIE.php
    • (new file) css/jquery.jgrowl.css
    • (new file) css/delta-jquery-ui-theme.css
    • (new file) css/alert.min.css
    • (new file) css/jquery.alerts.css
    • (new file) css/PIE.htc
    • (new file) css/jquery-ui-flick.css
    • ...
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • db_upgraded
    • widget_lenslider_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • recovery_mode_email_last_sent
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=lenslider-settings-page
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in LenSlider_Widget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/admin.php?page=lenslider-slider-page
    • > Notice in wp-content/plugins/len-slider/ls-slider.php+6
    Undefined index: slidernum
    • > GET request to /wp-admin/admin.php?page=lenslider-slider-page
    • > Notice in wp-content/plugins/len-slider/ls-slider.php+17
    Undefined index: skin

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
The following issues need your attention
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/len-slider/css/PIE.php
    • > /wp-content/plugins/len-slider/tinymce.php
    • > /wp-content/plugins/len-slider/ls-preview.php
  • 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/len-slider/lib/lenslider.widget.class.php:2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/len-slider/lib/lenslider.table.class.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'LenSlider' not found in wp-content/plugins/len-slider/lib/lenslider.skins.class.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'LenSlider' not found in wp-content/plugins/len-slider/skins/dares_serpent/lib/dares_serpent.skin.class.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'LenSlider' not found in wp-content/plugins/len-slider/skins/vania_fit/lib/vania_fit.skin.class.php:2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/len-slider/lib/lenslider.table.class.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'LenSlider' not found in wp-content/plugins/len-slider/lib/lenslider.settings.class.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/len-slider/ls-index.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'LenSlider' not found in wp-content/plugins/len-slider/skins/smart_energy/lib/smart_energy.skin.class.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'LenSlider' not found in wp-content/plugins/len-slider/skins/nemo_target/lib/nemo_target.skin.class.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 26 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #1 (Sliders admin manager. Skin `Vania Fit`), #2 (`Vania Fit` skin output), #3 (Sliders admin manager. Skin `Dares Serpent`), #4 (`Dares Serpent` skin output), #5 (Sliders admin manager. `Default` skin)
Please take inspiration from this readme.txt

len-slider/ls-index.php 85% from 13 tests

This is the main PHP file of "Len Slider" version 2.0.11, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("len-slider.php" instead of "ls-index.php")
  • Description: The description should be shorter than 140 characters (currently 252 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin7,419 lines of code in 80 files:
LanguageFilesBlank linesComment linesLines of code
PHP162552463,734
JavaScript391732661,679
CSS141252631,262
PO File2272354632
HTML501884
XML40028

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 145)
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity104.89
▷ Minimum class complexity1.00
▷ Maximum class complexity805.00
Average method complexity6.88
▷ Minimum method complexity1.00
▷ Maximum method complexity145.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes444.44%
Methods159
▷ Static methods5937.11%
▷ Public methods10968.55%
▷ Protected methods5031.45%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
93 PNG files occupy 2.27MB with 1.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon_uploadmovie_ma.png2.09KB1.45KB▼ 30.64%
images/alert/confirm@2x.png5.27KB2.94KB▼ 44.27%
skins/dares_serpent/output/images/slider-nav.png1.01KB0.33KB▼ 67.34%
images/icon_textonly.png4.21KB1.98KB▼ 53.06%
images/icon_help@2x.png3.53KB1.73KB▼ 50.86%