78% slider-carousel

Code Review | Slider Carousel WordPress Plugin

WordPress plugin Slider Carousel WordPress Plugin scored78%from 54 tests.

About plugin

  • Plugin page: slider-carousel
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.7.4
  • WordPress version: 6.3.1
  • First release: Apr 27, 2017
  • Latest release: Apr 27, 2017
  • Number of updates: 18
  • Update frequency: every 0.2 days
  • Top authors: kamig478 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /865 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼8.72ms] Passed 4 tests

A check of server-side resources used by Slider Carousel WordPress Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0834.48 ▼3.44
Dashboard /wp-admin3.38 ▲0.0346.57 ▼16.93
Posts /wp-admin/edit.php3.43 ▲0.0744.33 ▼0.38
Add New Post /wp-admin/post-new.php5.98 ▲0.0981.84 ▼13.66
Media Library /wp-admin/upload.php3.30 ▲0.0733.05 ▼0.84
All Sliders /wp-admin/edit.php?post_type=sc-slider3.3434.65
Slider Categories /wp-admin/edit-tags.php?taxonomy=sc_slider_category&post_type=sc-slider3.3031.54
Add New /wp-admin/post-new.php?post_type=sc-slider3.4248.37

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Slider Carousel WordPress Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8813.61 ▼1.011.62 ▼0.1539.87 ▼3.54
Dashboard /wp-admin2,234 ▲435.81 ▲0.7996.09 ▼4.2539.95 ▲0.42
Posts /wp-admin/edit.php2,120 ▲312.03 ▲0.0434.40 ▼3.5030.75 ▼4.38
Add New Post /wp-admin/post-new.php1,559 ▲4023.25 ▲0.19684.97 ▲13.1536.49 ▼8.35
Media Library /wp-admin/upload.php1,419 ▲314.26 ▼0.0395.31 ▼1.9745.95 ▲0.76
All Sliders /wp-admin/edit.php?post_type=sc-slider1,1011.9531.7330.24
Slider Categories /wp-admin/edit-tags.php?taxonomy=sc_slider_category&post_type=sc-slider1,2902.1331.1530.67
Add New /wp-admin/post-new.php?post_type=sc-slider2,2847.70164.8864.68

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/slider-carousel/slider-carousel.php
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/slider-carousel/includes/single-sc-slider.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/slider-carousel/includes/sc-slider-content.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/slider-carousel/includes/sc-slider-settings.php:3
    • > PHP Warning
      require_once(SLIDER_CAROUSEL_DIR/includes/sc_galaxy_post_types.php): failed to open stream: No such file or directory in wp-content/plugins/slider-carousel/functions.php on line 7
    • > PHP Warning
      Use of undefined constant SLIDER_CAROUSEL_DIR - assumed 'SLIDER_CAROUSEL_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/slider-carousel/functions.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/slider-carousel/includes/extend/sc-gallery-shortcodes-buttons.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/slider-carousel/includes/sc_galaxy_post_types.php:60
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/slider-carousel/includes/sc-slider-shortcodes.php:21
    • > PHP Fatal error
      require_once(): Failed opening required 'SLIDER_CAROUSEL_DIR/includes/sc_galaxy_post_types.php' (include_path='.:/usr/share/php') in wp-content/plugins/slider-carousel/functions.php on line 7

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: No descriptions were found for these screenshots #2, #3, #4, #5, #6, #7, #8 in slider-carousel/assets to your readme.txt
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
The official readme.txt is a good inspiration

slider-carousel/slider-carousel.php Passed 13 tests

The entry point to "Slider Carousel WordPress Plugin" version 1.0 is a PHP file that has certain tags in its header comment area
135 characters long description:
A plugin to show your work portfolio in more than 50 possible sliders/carousels and more than 100 possible grid and masonry portfolios.

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
Success! There were no dangerous files found in this plugin17,771 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
CSS61,13313114,984
JavaScript65872131,726
SVG200732
PHP93273316
PO File10013

PHP code Passed 2 tests

An short overview of 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.14
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/gt-btn-icon.png4.54KB2.57KB▼ 43.33%