72% bee-layer-slider

Code Review | Layer Slider

WordPress plugin Layer Slider scored 72% from 54 tests.

About plugin

  • Plugin page: bee-layer-slider
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.6
  • WordPress version: 6.3.1
  • First release: Oct 8, 2016
  • Latest release: May 23, 2018
  • Number of updates: 106
  • Update frequency: every 5.6 days
  • Top authors: aumsrini (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

600+ active / 39,138 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.31MB] [CPU: ▼7.21ms] Passed 4 tests

Server-side resources used by Layer Slider
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.3931.07 ▼16.10
Dashboard /wp-admin3.65 ▲0.3541.73 ▼5.81
Posts /wp-admin/edit.php3.79 ▲0.4344.14 ▼8.27
Add New Post /wp-admin/post-new.php5.97 ▲0.0898.08 ▲1.34
Media Library /wp-admin/upload.php3.67 ▲0.4544.05 ▲11.33
Global Settings /wp-admin/edit.php?post_type=beeslider&page=bee_slider_settings3.9052.93
Add New Slider /wp-admin/post-new.php?post_type=beeslider3.8243.35
Layer Sliders /wp-admin/edit.php?post_type=beeslider3.7632.88

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 252 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Layer Slider: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,964 ▲21813.78 ▼0.807.91 ▲5.9942.43 ▲1.58
Dashboard /wp-admin2,257 ▲694.91 ▼1.00206.75 ▲94.3789.36 ▲43.09
Posts /wp-admin/edit.php2,143 ▲542.01 ▲0.0148.84 ▲8.1851.26 ▲9.66
Add New Post /wp-admin/post-new.php1,450 ▼6417.92 ▲0.37663.53 ▲10.6035.24 ▼20.25
Media Library /wp-admin/upload.php1,436 ▲484.19 ▼0.11127.62 ▲23.1293.72 ▲51.34
Global Settings /wp-admin/edit.php?post_type=beeslider&page=bee_slider_settings2,5067.64117.75103.36
Add New Slider /wp-admin/post-new.php?post_type=beeslider1,7093.9172.3891.18
Layer Sliders /wp-admin/edit.php?post_type=beeslider1,1121.9832.8332.19

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 24 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=beeslider
    • > Notice in wp-content/plugins/bee-layer-slider/includes/framework/extn/mb-settings-page/inc/settings-page-meta-box.php+162
    Trying to access array offset on value of type null

SRP 0% 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
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/bee-layer-slider/admin/partials/bee-slider-admin-display.php
    • > /wp-content/plugins/bee-layer-slider/includes/framework/inc/templates/image-advanced.php
    • > /wp-content/plugins/bee-layer-slider/includes/framework/inc/templates/media.php
    • > /wp-content/plugins/bee-layer-slider/includes/framework/inc/templates/upload.php
    • > /wp-content/plugins/bee-layer-slider/public/partials/bee-slider-public-display.php
  • 52× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Field' not found in wp-content/plugins/bee-layer-slider/includes/framework/inc/fields/map.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_File_Field' not found in wp-content/plugins/bee-layer-slider/includes/framework/inc/fields/media.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Media_Field' not found in wp-content/plugins/bee-layer-slider/includes/framework/inc/fields/file-upload.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Multiple_Values_Field' not found in wp-content/plugins/bee-layer-slider/includes/framework/inc/fields/text-list.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Select_Field' not found in wp-content/plugins/bee-layer-slider/includes/framework/inc/fields/select-advanced.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Walker' not found in wp-content/plugins/bee-layer-slider/includes/framework/inc/walkers/base.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Field' not found in wp-content/plugins/bee-layer-slider/includes/framework/inc/fields/divider.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Input_List_Field' not found in wp-content/plugins/bee-layer-slider/includes/framework/inc/fields/checkbox-list.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Field' not found in wp-content/plugins/bee-layer-slider/includes/framework/inc/fields/file.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Field' not found in wp-content/plugins/bee-layer-slider/includes/framework/inc/fields/heading.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: responsive image slider, text slider, slideshow, layer slider, banner slider...

bee-layer-slider/bee-slider.php 85% from 13 tests

This is the main PHP file of "Layer Slider" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("bee-layer-slider.php" instead of "bee-slider.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
No dangerous file extensions were detected9,128 lines of code in 206 files:
LanguageFilesBlank linesComment linesLines of code
PHP859473,2144,508
JavaScript835855572,805
CSS351391091,778
PO File12427
JSON20010

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity6.81
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity2.28
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes73
▷ Abstract classes79.59%
▷ Concrete classes6690.41%
▷ Final classes00.00%
Methods331
▷ Static methods23871.90%
▷ Public methods31193.96%
▷ Protected methods154.53%
▷ Private methods51.51%
Functions22
▷ Named functions2090.91%
▷ Anonymous functions29.09%
Constants6
▷ Global constants6100.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
18 compressed PNG files occupy 0.05MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/framework/img/jqueryui/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
includes/framework/img/jqueryui/ui-icons_888888_256x240.png4.27KB4.11KB▼ 3.78%
includes/framework/img/jqueryui/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
includes/framework/img/jqueryui/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
includes/framework/img/jqueryui/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%