68% light-slider

Code Review | Light Slider

WordPress plugin Light Slider scored 68% from 54 tests.

About plugin

  • Plugin page: light-slider
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.6.1
  • WordPress version: 6.3.1
  • First release: Nov 17, 2016
  • Latest release: Nov 25, 2016
  • Number of updates: 10
  • Update frequency: every 0.1 days
  • Top authors: saturnthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,344 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.19ms] Passed 4 tests

Analyzing server-side resources used by Light Slider
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0443.42 ▲2.93
Dashboard /wp-admin3.34 ▲0.0446.75 ▼3.54
Posts /wp-admin/edit.php3.39 ▲0.0443.36 ▼0.26
Add New Post /wp-admin/post-new.php5.92 ▲0.0484.86 ▼7.89
Media Library /wp-admin/upload.php3.26 ▲0.0333.51 ▲3.29

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 39 new files
Database: 2 new tables, 6 new options
New tables
wp_sls_sliders
wp_sls_slides
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Light Slider
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲8113.29 ▼1.301.86 ▲0.1242.62 ▼3.62
Dashboard /wp-admin2,216 ▲285.83 ▲0.97104.95 ▼7.0938.08 ▼9.34
Posts /wp-admin/edit.php2,102 ▲132.04 ▲0.0336.71 ▲2.8531.89 ▼4.65
Add New Post /wp-admin/post-new.php1,547 ▲1323.07 ▲0.11670.83 ▲12.7651.77 ▼8.01
Media Library /wp-admin/upload.php1,404 ▲194.23 ▲0.0398.38 ▼4.3442.18 ▼1.97

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie tables were found after uninstall: 2 tables
    • wp_sls_slides
    • wp_sls_sliders
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/light-slider/themes/basic/admin-template.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/light-slider/inc/sls-core-functions.php:7
    • > PHP Notice
      Undefined variable: theme in wp-content/plugins/light-slider/inc/admin/views/html-admin-preview.php on line 33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/light-slider/inc/admin/views/html-admin-page-all-sliders.php:2
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_template_path() on null in wp-content/plugins/light-slider/inc/admin/views/html-admin-preview.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/light-slider/themes/basic/data.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/light-slider/themes/basic/template.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === light-slider === )
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

light-slider/light-slider.php 92% from 13 tests

This is the main PHP file of "Light Slider" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.0" instead of "4.4")

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
Good job! No executable or dangerous file extensions detected2,315 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP23278481,289
JavaScript6186128641
CSS27341385

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity8.57
▷ Minimum class complexity3.00
▷ Maximum class complexity21.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods68
▷ Static methods2130.88%
▷ Public methods5682.35%
▷ Protected methods45.88%
▷ Private methods811.76%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
themes/basic/images/bt-next.png0.28KB0.37KB0.00%
assets/images/admin/no-image.png8.87KB3.96KB▼ 55.39%
themes/basic/images/bt-prev.png0.29KB0.39KB0.00%