72% slider-pro-wp

Code Review | Slider Pro

WordPress plugin Slider Pro scored 72% from 54 tests.

About plugin

  • Plugin page: slider-pro-wp
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.0-5.5.1
  • WordPress version: 6.3.1
  • First release: Oct 3, 2020
  • Latest release: Oct 3, 2020
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: devnath verma (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 696 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.54MB] [CPU: ▼15.93ms] Passed 4 tests

This is a short check of server-side resources used by Slider Pro
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1436.59 ▼8.25
Dashboard /wp-admin3.46 ▲0.1552.76 ▲4.33
Posts /wp-admin/edit.php3.58 ▲0.2254.63 ▲7.28
Add New Post /wp-admin/post-new.php3.29 ▼2.6038.98 ▼60.36
Media Library /wp-admin/upload.php3.36 ▲0.1334.80 ▲0.56
Add Slider /wp-admin/post-new.php?post_type=slider_pro3.2935.13
All Sliders /wp-admin/edit.php?post_type=slider_pro3.4440.59

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Slider Pro: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,053 ▲30715.30 ▲1.016.37 ▲4.5739.20 ▼1.81
Dashboard /wp-admin2,379 ▲1916.52 ▲0.63139.61 ▲28.8043.24 ▼6.68
Posts /wp-admin/edit.php2,285 ▲1963.37 ▲1.3755.14 ▲14.9334.33 ▼3.57
Add New Post /wp-admin/post-new.php1,555 ▲2123.01 ▼0.41612.88 ▼78.4836.20 ▼22.04
Media Library /wp-admin/upload.php1,416 ▲314.12 ▼0.0482.11 ▼19.6642.53 ▲1.30
Add Slider /wp-admin/post-new.php?post_type=slider_pro3,4373.5874.87115.88
All Sliders /wp-admin/edit.php?post_type=slider_pro1,2853.4748.2630.19

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • 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
Please fix the following server-side errors
    • > GET request to /wp-admin/post-new.php?post_type=slider_pro
    • > Notice in wp-content/plugins/slider-pro-wp/admin/class-admin-settings.php+207
    Undefined index: sp4wp_save_nonce
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=slider_pro
    • > Notice in wp-content/plugins/slider-pro-wp/admin/view/slider-type.php+268
    Trying to get property 'term_id' of non-object
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=slider_pro
    • > Notice in wp-content/plugins/slider-pro-wp/admin/view/slider-type.php+269
    Trying to get property 'name' of non-object

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/slider-pro-wp/slider-pro.php
    • > /wp-content/plugins/slider-pro-wp/public/view/slider-shortcode.php
  • 36× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: post in wp-content/plugins/slider-pro-wp/admin/view/slider-get-settings.php on line 18
    • > PHP Notice
      Undefined variable: sliderpro_sliderautoslidesize in wp-content/plugins/slider-pro-wp/public/view/slider-shortcode.php on line 472
    • > PHP Notice
      Undefined variable: sliderpro_sliderautoheight in wp-content/plugins/slider-pro-wp/public/view/slider-shortcode.php on line 471
    • > PHP Notice
      Undefined variable: sliderpro_navigationfullscreenbtn in wp-content/plugins/slider-pro-wp/public/view/slider-shortcode.php on line 489
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/slider-pro-wp/admin/view/slider-get-settings.php on line 18
    • > PHP Notice
      Undefined variable: sliderpro_navigationarrowsonhover in wp-content/plugins/slider-pro-wp/public/view/slider-shortcode.php on line 486
    • > PHP Notice
      Undefined variable: sliderpro_sliderloop in wp-content/plugins/slider-pro-wp/public/view/slider-shortcode.php on line 474
    • > PHP Notice
      Undefined variable: sliderpro_sliderorientation in wp-content/plugins/slider-pro-wp/public/view/slider-shortcode.php on line 478
    • > PHP Notice
      Undefined variable: sliderpro_slidertouchswipe in wp-content/plugins/slider-pro-wp/public/view/slider-shortcode.php on line 479
    • > PHP Notice
      Undefined variable: sliderpro_navigationfullscreenbtnonhover in wp-content/plugins/slider-pro-wp/public/view/slider-shortcode.php on line 490

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: post slider, woocommerce slider, content slider, slider, image slider

slider-pro-wp/slider-pro.php 92% from 13 tests

This is the main PHP file of "Slider Pro" version 1.0.0, 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 ("slider-pro-wp.php" instead of "slider-pro.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected6,795 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript21,3471,0003,992
PHP143973881,986
CSS214546817

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity11.43
▷ Minimum class complexity1.00
▷ Maximum class complexity68.00
Average method complexity3.52
▷ Minimum method complexity1.00
▷ Maximum method complexity64.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods517.24%
▷ Public methods29100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants16
▷ Global constants16100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/delete-icon.png18.37KB8.39KB▼ 54.31%