10% flexible-slider

Code Review | Flexible Slider

WordPress plugin Flexible Slider scored10%from 54 tests.

About plugin

  • Plugin page: flexible-slider
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5
  • WordPress version: 6.3.1
  • First release: Dec 21, 2012
  • Latest release: Dec 24, 2012
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: youpick (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

40+ active /4,883 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/flexible-slider/flexibleslider.php+455
    Non-static method flexibleslider::init_fslider() should not be called statically

Server metrics [RAM: ▼1.64MB] [CPU: ▼63.06ms] Passed 4 tests

Analyzing server-side resources used by Flexible Slider
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.36 ▼1.107.04 ▼42.62
Dashboard /wp-admin2.38 ▼0.978.68 ▼61.11
Posts /wp-admin/edit.php2.38 ▼0.988.44 ▼46.90
Add New Post /wp-admin/post-new.php2.38 ▼3.518.90 ▼101.62
Media Library /wp-admin/upload.php2.38 ▼0.857.54 ▼29.25
Upload image /wp-admin/admin.php?page=flexibleslider_upload2.388.07
Save slider /wp-admin/admin.php?page=flexibleslider_save2.388.23
Delete image /wp-admin/admin.php?page=flexibleslider_delete_image2.388.28
Add/Edit slider /wp-admin/admin.php?page=flexibleslider_edit2.386.41
Delete slider /wp-admin/admin.php?page=flexibleslider_delete2.387.67

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 26 new files
Database: 1 new table, 6 new options
New tables
wp_flexibleslider
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Flexible Slider
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,892 ▲14613.44 ▼0.839.22 ▲7.1145.77 ▲3.78
Dashboard /wp-admin2,218 ▲445.62 ▼0.0589.17 ▼11.6142.70 ▼3.12
Posts /wp-admin/edit.php2,120 ▲171.99 ▼0.0234.08 ▼3.6333.59 ▼2.63
Add New Post /wp-admin/post-new.php1,543 ▲1523.32 ▲0.20649.16 ▼16.7358.07 ▼1.28
Media Library /wp-admin/upload.php1,423 ▲234.17 ▼0.0699.23 ▼19.8640.80 ▼10.77
Upload image /wp-admin/admin.php?page=flexibleslider_upload7831.9926.8725.80
Save slider /wp-admin/admin.php?page=flexibleslider_save2,2394.5982.8241.57
Delete image /wp-admin/admin.php?page=flexibleslider_delete_image7751.9923.7726.47
Add/Edit slider /wp-admin/admin.php?page=flexibleslider_edit1,4792.7668.1032.91
Delete slider /wp-admin/admin.php?page=flexibleslider_delete1,6163.4661.2528.30

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/flexible-slider/flexibleslider.php+455
    Non-static method flexibleslider::init_fslider() should not be called statically
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=flexibleslider_delete
    • > Deprecated in wp-content/plugins/flexible-slider/flexibleslider.php+455
    Non-static method flexibleslider::init_fslider() should not be called statically
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=flexibleslider_delete
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method flexibleslider::fslider_menu() should not be called statically
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=flexibleslider_delete
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method flexibleslider::admin_scripts() should not be called statically
    • > GET request to /wp-admin/admin.php?page=flexibleslider_upload
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method flexibleslider::fslider_upload() should not be called statically
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=flexibleslider_delete_image
    • > Notice in wp-content/plugins/flexible-slider/flexibleslider.php+260
    Undefined index: itemid
    • > GET request to /wp-admin/admin.php?page=flexibleslider_upload
    • > Notice in wp-content/plugins/flexible-slider/flexibleslider.php+219
    Undefined index: uniquename
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=flexibleslider_edit
    • > Notice in wp-content/plugins/flexible-slider/view.php+78
    Undefined offset: 0
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=flexibleslider_edit
    • > Notice in wp-content/plugins/flexible-slider/view.php+286
    Trying to get property 'images' of non-object
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=flexibleslider_edit
    • > Notice in wp-content/plugins/flexible-slider/view.php+287
    Trying to get property 'slidetitles' of non-object
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=flexibleslider_edit
    • > Notice in wp-content/plugins/flexible-slider/view.php+288
    Trying to get property 'links' of non-object
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=flexibleslider_edit
    • > Notice in wp-content/plugins/flexible-slider/view.php+289
    Trying to get property 'targets' of non-object
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=flexibleslider_edit
    • > Notice in wp-content/plugins/flexible-slider/view.php+290
    Trying to get property 'descriptions' of non-object
    • > GET request to /wp-admin/admin.php?page=flexibleslider_upload
    • > Deprecated in wp-content/plugins/flexible-slider/flexibleslider.php+230
    Non-static method flexibleslider::upload() should not be called statically
    • > GET request to /wp-admin/admin.php?page=flexibleslider_upload
    • > Notice in wp-content/plugins/flexible-slider/flexibleslider.php+230
    Trying to get property 'width' of non-object
    • > GET request to /wp-admin/admin.php?page=flexibleslider_upload
    • > Notice in wp-content/plugins/flexible-slider/flexibleslider.php+230
    Trying to get property 'height' of non-object
    • > GET request to /wp-admin/admin.php?page=flexibleslider_upload
    • > Warning in wp-content/plugins/flexible-slider/file.php+96
    mkdir(): File exists
    • > GET request to /wp-admin/admin.php?page=flexibleslider_save
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method flexibleslider::fslider_save() should not be called statically
    • > GET request to /wp-admin/admin.php?page=flexibleslider_save
    • > Notice in wp-content/plugins/flexible-slider/flexibleslider.php+114
    Undefined index: title
    • > GET request to /wp-admin/admin.php?page=flexibleslider_save
    • > Notice in wp-content/plugins/flexible-slider/flexibleslider.php+115
    Undefined index: width
    • > GET request to /wp-admin/admin.php?page=flexibleslider_save
    • > Notice in wp-content/plugins/flexible-slider/flexibleslider.php+116
    Undefined index: height
    • > GET request to /wp-admin/admin.php?page=flexibleslider_save
    • > Notice in wp-content/plugins/flexible-slider/flexibleslider.php+117
    Undefined index: drag
    • > GET request to /wp-admin/admin.php?page=flexibleslider_save
    • > Notice in wp-content/plugins/flexible-slider/flexibleslider.php+118
    Undefined index: auto
    • > GET request to /wp-admin/admin.php?page=flexibleslider_save
    • > Notice in wp-content/plugins/flexible-slider/flexibleslider.php+119
    Undefined index: timer
    • > GET request to /wp-admin/admin.php?page=flexibleslider_save
    • > Notice in wp-content/plugins/flexible-slider/flexibleslider.php+120
    Undefined index: infinite
    • > GET request to /wp-admin/admin.php?page=flexibleslider_save
    • > Notice in wp-content/plugins/flexible-slider/flexibleslider.php+121
    Undefined index: keyboard
    • > GET request to /wp-admin/admin.php?page=flexibleslider_save
    • > Notice in wp-content/plugins/flexible-slider/flexibleslider.php+127
    Undefined index: type
    • > GET request to /wp-admin/admin.php?page=flexibleslider_save
    • > Notice in wp-content/plugins/flexible-slider/flexibleslider.php+128
    Undefined index: titlefont
    • > GET request to /wp-admin/admin.php?page=flexibleslider_save
    • > Notice in wp-content/plugins/flexible-slider/flexibleslider.php+129
    Undefined index: titlecolor
    • > GET request to /wp-admin/admin.php?page=flexibleslider_save
    • > Notice in wp-content/plugins/flexible-slider/flexibleslider.php+130
    Undefined index: titlesize
    • > GET request to /wp-admin/admin.php?page=flexibleslider_save
    • > Notice in wp-content/plugins/flexible-slider/flexibleslider.php+131
    Undefined index: descfont
    • > GET request to /wp-admin/admin.php?page=flexibleslider_save
    • > Notice in wp-content/plugins/flexible-slider/flexibleslider.php+132
    Undefined index: desccolor
    • > GET request to /wp-admin/admin.php?page=flexibleslider_save
    • > Notice in wp-content/plugins/flexible-slider/flexibleslider.php+133
    Undefined index: descsize
    • > GET request to /wp-admin/admin.php?page=flexibleslider_save
    • > Notice in wp-content/plugins/flexible-slider/flexibleslider.php+139
    Undefined index: close
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=flexibleslider_edit
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method flexibleslider::fslider_edit() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=flexibleslider_edit
    • > Notice in wp-content/plugins/flexible-slider/view.php+99
    Trying to get property 'title' of non-object
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=flexibleslider_edit
    • > Notice in wp-content/plugins/flexible-slider/view.php+114
    Trying to get property 'drag' of non-object
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=flexibleslider_edit
    • > Notice in wp-content/plugins/flexible-slider/view.php+124
    Trying to get property 'auto' of non-object
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=flexibleslider_edit
    • > Notice in wp-content/plugins/flexible-slider/view.php+138
    Trying to get property 'infinite' of non-object
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=flexibleslider_edit
    • > Notice in wp-content/plugins/flexible-slider/view.php+148
    Trying to get property 'keyboard' of non-object
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=flexibleslider_edit
    • > Notice in wp-content/plugins/flexible-slider/view.php+222
    Trying to get property 'type' of non-object
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=flexibleslider_edit
    • > Notice in wp-content/plugins/flexible-slider/view.php+255
    Trying to get property 'titlefont' of non-object
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=flexibleslider_edit
    • > Notice in wp-content/plugins/flexible-slider/view.php+257
    Trying to get property 'descfont' of non-object
    • > GET request to /wp-admin/admin.php?page=flexibleslider_delete_image
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method flexibleslider::fslider_delete_image() should not be called statically
    • > GET request to /wp-admin/admin.php?page=flexibleslider_delete_image
    • > Notice in wp-content/plugins/flexible-slider/flexibleslider.php+261
    Undefined index: removedImage
    • > GET request to /wp-admin/admin.php?page=flexibleslider_delete_image
    • > Notice in wp-content/plugins/flexible-slider/flexibleslider.php+262
    Undefined index: remainedImages
    • > GET request to /wp-admin/admin.php?page=flexibleslider_delete_image
    • > Notice in wp-content/plugins/flexible-slider/flexibleslider.php+263
    Undefined index: remainedSlideTitles
    • > GET request to /wp-admin/admin.php?page=flexibleslider_delete_image
    • > Notice in wp-content/plugins/flexible-slider/flexibleslider.php+264
    Undefined index: remainedLinks
    • > GET request to /wp-admin/admin.php?page=flexibleslider_delete_image
    • > Notice in wp-content/plugins/flexible-slider/flexibleslider.php+265
    Undefined index: remainedLinkTargets
    • > GET request to /wp-admin/admin.php?page=flexibleslider_delete_image
    • > Notice in wp-content/plugins/flexible-slider/flexibleslider.php+266
    Undefined index: remainedDescriptions
    • > GET request to /wp-admin/admin.php?page=flexibleslider_delete_image
    • > Warning in wp-content/plugins/flexible-slider/file.php+192
    unlink(wp-content/plugins/flexible-slider/images//): Is a directory
    • > GET request to /wp-admin/admin.php?page=flexibleslider_delete_image
    • > User error in wp-content/plugins/flexible-slider/file.php+198
    JLIB_FILESYSTEM_DELETE_FAILED
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=flexibleslider_delete
    • > Notice in wp-content/plugins/flexible-slider/flexibleslider.php+89
    Undefined index: id
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=flexibleslider_delete
    • > Notice in wp-content/plugins/flexible-slider/flexibleslider.php+98
    Undefined index: msg
    • > GET request to /wp-admin/admin.php?page=flexibleslider_delete
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method flexibleslider::fslider_delete() should not be called statically
    • > GET request to /wp-admin/admin.php?page=flexibleslider_delete
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method flexibleslider::fslider_list() should not be called statically

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 take a closer look at the following
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/flexible-slider/view.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/flexible-slider/view.php on line 4
    • > 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/flexible-slider/view.php on line 4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/flexible-slider/view.php on line 4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/flexible-slider/view.php on line 4
    • > 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/flexible-slider/view.php on line 4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=flexibleslider_delete
    • > Javascript (severe) in unknown
    /wp-content/plugins/flexible-slider/assets/jquery.bgiframe-2.1.2.js?ver=6.3.1 5:38 Uncaught TypeError: Cannot read properties of undefined (reading 'msie')
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=flexibleslider_edit
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-draggable,jquery-ui-controlgroup,j&load%5Bchunk_1%5D=query-ui-checkboxradio,jquery-ui-button,jquery-ui-dialog,jquery-ui-sortable,farbtastic&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/flexible-slider/assets/detail.js?ver=6.3.1:1:509)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-draggable,jquery-ui-controlgroup,j&load%5Bchunk_1%5D=query-ui-checkboxradio,jquery-ui-button,jquery-ui-dialog,jquery-ui-sortable,farbtastic&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-draggable,jquery-ui-controlgroup,j&load%5Bchunk_1%5D=query-ui-checkboxradio,jquery-ui-button,jquery-ui-dialog,jquery-ui-sortable,farbtastic&ver=6.3.1:2:27292)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=flexibleslider_edit
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-mouse,jquery-ui-resizable,jquery-ui-draggable,jquery-ui-controlgroup,j&load%5Bchunk_1%5D=query-ui-checkboxradio,jquery-ui-button,jquery-ui-dialog,jquery-ui-sortable,farbtastic&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === flexible-slider === )
The official readme.txt might help

flexible-slider/flexibleslider.php 92% from 13 tests

The entry point to "Flexible Slider" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("flexible-slider.php" instead of "flexibleslider.php")

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
Success! There were no dangerous files found in this plugin1,443 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP43132711,433
JavaScript8068
CSS2032

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity33.75
▷ Minimum class complexity17.00
▷ Maximum class complexity50.00
Average method complexity4.12
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods42
▷ Static methods00.00%
▷ Public methods42100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
9 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
assets/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
assets/images/ui-bg_glass_65_ffffff_1x400.png0.10KB0.10KB▼ 5.71%
assets/images/slider-buttons.png1.60KB0.49KB▼ 69.07%
assets/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%