10% wp-custom-slider

Code Review | Wp custom slider

WordPress plugin Wp custom slider scored10%from 54 tests.

About plugin

  • Plugin page: wp-custom-slider
  • Plugin version: 1.6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 6.3.1
  • First release: Aug 21, 2014
  • Latest release: Aug 26, 2014
  • Number of updates: 10
  • Update frequency: every 0.6 days
  • Top authors: wpatbest (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,765 total downloads

Benchmarks

Plugin footprint 23% 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
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/wp-custom-slider/customslider.php+92
    Undefined variable: jal_db_version

Server metrics [RAM: ▼1.23MB] [CPU: ▼40.10ms] Passed 4 tests

Server-side resources used by Wp custom slider
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.73 ▼0.7215.32 ▼25.31
Dashboard /wp-admin2.78 ▼0.5315.32 ▼36.80
Posts /wp-admin/edit.php2.78 ▼0.5816.13 ▼28.04
Add New Post /wp-admin/post-new.php2.78 ▼3.1115.60 ▼70.24
Media Library /wp-admin/upload.php2.78 ▼0.4514.82 ▼15.91
custom slider /wp-admin/options-general.php?page=custom_slider2.7815.49

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 25 new files
Database: 2 new tables, 8 new options
New tables
wp_customslider_settings
wp_customslider_images
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
custom_slider_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
jal_db_version

Browser metrics Passed 4 tests

Wp custom slider: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.22 ▼1.091.64 ▼0.4240.48 ▼9.85
Dashboard /wp-admin2,210 ▲194.85 ▼0.03109.17 ▲2.4439.95 ▼3.52
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0139.45 ▲4.8735.11 ▲2.62
Add New Post /wp-admin/post-new.php1,520 ▲617.72 ▼0.02597.16 ▼98.6658.37 ▲4.30
Media Library /wp-admin/upload.php1,392 ▲44.24 ▲0.0292.59 ▼10.5944.45 ▼2.49
custom slider /wp-admin/options-general.php?page=custom_slider1,0242.0337.8854.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/wp-custom-slider/customslider.php+138
    Use of undefined constant custom_slider_DIR - assumed 'custom_slider_DIR' (this will throw an Error in a future version of PHP)
  • Zombie tables detected upon uninstall: 2 tables
    • wp_customslider_settings
    • wp_customslider_images
  • Zombie WordPress options were found after uninstall: 8 options
    • db_upgraded
    • widget_recent-posts
    • jal_db_version
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • custom_slider_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% 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)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=custom_slider
    • > Warning in wp-content/plugins/wp-custom-slider/customslider.php+138
    Use of undefined constant custom_slider_DIR - assumed 'custom_slider_DIR' (this will throw an Error in a future version of PHP)

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (assets/screenshot-1.png), #2 (assets/screenshot-3.png)
Please take inspiration from this readme.txt

wp-custom-slider/customslider.php 92% from 13 tests

"Wp custom slider" version 1.6.2'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:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-custom-slider.php" instead of "customslider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected5,858 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript41,3738044,906
PHP4287349952

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity15.00
▷ Minimum class complexity9.00
▷ Maximum class complexity21.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods2589.29%
▷ Protected methods310.71%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/play.png0.95KB1.00KB0.00%
images/controls.png2.74KB1.42KB▼ 48.29%
images/right.png1.83KB1.74KB▼ 5.06%
images/a11.png4.07KB2.49KB▼ 38.87%
images/left.png1.81KB1.70KB▼ 6.19%