10% cyber-new-slider

Code Review | Cyber Slider

WordPress plugin Cyber Slider scored10%from 54 tests.

About plugin

  • Plugin page: cyber-new-slider
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Apr 4, 2016
  • Latest release: Apr 4, 2016
  • Number of updates: 2
  • Update frequency: every 8.5 days
  • Top authors: cybersource (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /842 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/cyber-new-slider/classes/class.cs.widget.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; Cyberslider_Widgets has a deprecated constructor

Server metrics [RAM: ▼1.25MB] [CPU: ▼54.79ms] Passed 4 tests

This is a short check of server-side resources used by Cyber Slider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.74 ▼0.728.11 ▼36.99
Dashboard /wp-admin2.76 ▼0.5810.33 ▼52.29
Posts /wp-admin/edit.php2.76 ▼0.599.18 ▼45.23
Add New Post /wp-admin/post-new.php2.76 ▼3.128.83 ▼84.66
Media Library /wp-admin/upload.php2.76 ▼0.469.23 ▼24.74
Cyber Slider /wp-admin/admin.php?page=cyber-slider2.7610.39
Global Settings /wp-admin/admin.php?page=cyber-slider-global2.769.28

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 47 new files
Database: 2 new tables, 7 new options
New tables
wp_cyberslider_slides
wp_cyberslider
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_cyberslider_widgets
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Cyber Slider
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,160 ▲41416.24 ▲1.867.72 ▲6.1348.83 ▲9.58
Dashboard /wp-admin2,417 ▲2267.15 ▲1.25147.48 ▲42.11101.24 ▲62.37
Posts /wp-admin/edit.php2,346 ▲2573.66 ▲1.6169.82 ▲33.9173.09 ▲37.27
Add New Post /wp-admin/post-new.php1,601 ▲6823.42 ▲0.20653.66 ▼47.1042.45 ▼23.50
Media Library /wp-admin/upload.php1,482 ▲944.88 ▲0.6591.41 ▼15.26103.86 ▲56.68
Cyber Slider /wp-admin/admin.php?page=cyber-slider1,1183.6756.9272.19
Global Settings /wp-admin/admin.php?page=cyber-slider-global1,1463.6542.1667.16

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/cyber-new-slider/classes/class.cs.widget.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; Cyberslider_Widgets has a deprecated constructor
  • Zombie tables were found after uninstall: 2 tables
    • wp_cyberslider
    • wp_cyberslider_slides
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_cyberslider_widgets
    • widget_theysaidso_widget
    • widget_recent-posts

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
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cyber-slider-global
    • > Deprecated in wp-content/plugins/cyber-new-slider/classes/class.cs.widget.php+10
    Methods with the same name as their class will not be constructors in a future version of PHP; Cyberslider_Widgets has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cyber-slider-global
    • > Deprecated in wp-content/plugins/cyber-new-slider/classes/class.cs.widget.php+103
    Function create_function() is deprecated
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cyber-slider-global
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Cyberslider_Widgets is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/admin.php?page=cyber-slider
    • > Notice in wp-content/plugins/cyber-new-slider/includes/inc_php/menus.php+10
    Undefined index: action
    • > GET request to /wp-admin/admin.php?page=cyber-slider
    • > Notice in wp-content/plugins/cyber-new-slider/includes/inc_php/menus.php+25
    Undefined index: status
    • > GET request to /wp-admin/admin.php?page=cyber-slider-global
    • > Notice in wp-content/plugins/cyber-new-slider/includes/inc_php/menus.php+131
    unserialize(): Error at offset 0 of 1 bytes
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cyber-slider-global
    • > Notice in wp-content/plugins/cyber-new-slider/includes/inc_php/menus.php+179
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 8× 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/cyber-new-slider/includes/inc_php/dynamic-functions.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/cyber-new-slider/includes/inc_php/ajax-backend-functions.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cyber-new-slider/includes/inc_php/menus.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/cyber-new-slider/classes/class.cs.widget.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/cyber-new-slider/includes/inc_php/activation.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cyber-new-slider/classes/class.cs.tiny.mce.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cyber-new-slider/includes/inc_php/scripts.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cyber-new-slider/includes/inc_php/shortcode.php:389

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
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cyber-slider-global
    • > Javascript (severe) in unknown
    https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js 5:215 Uncaught Error: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (Shortcode usage for the slider.), #2 (Fo more detail please have a look on the documenation page HERE. .), #3 (Cyber Slider thumbnail settings.), #4 (Created sliders overview.), #5 (Adding new slider.)
  • Donate link: Please fix this invalid URI: ""
Please take inspiration from this readme.txt

cyber-new-slider/cyber-slider.php 85% from 13 tests

"Cyber Slider" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: The principal plugin file should be the same as the plugin slug ("cyber-new-slider.php" instead of "cyber-slider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin8,111 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
CSS7626533,438
PHP94812272,552
JavaScript85631972,121

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.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
11 PNG files occupy 0.37MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/menu_icon.png1.81KB0.90KB▼ 50.27%
images/arrows_prev.png3.21KB2.46KB▼ 23.39%
images/next.png0.25KB0.18KB▼ 28.40%
screenshot-5.png64.91KB23.80KB▼ 63.34%
screenshot-4.png78.28KB29.26KB▼ 62.62%