10% simple-carousel-slider

Code Review | Simple Carousel Plugin

WordPress plugin Simple Carousel Plugin scored10%from 54 tests.

About plugin

  • Plugin page: simple-carousel-s...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-3.8.1
  • WordPress version: 6.3.1
  • First release: Mar 5, 2014
  • Latest release: Mar 5, 2014
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: dantaylorseo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,364 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/simple-carousel-slider/simple-carousel-slider.php+36
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼0.62MB] [CPU: ▼12.22ms] Passed 4 tests

This is a short check of server-side resources used by Simple Carousel Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0749.19 ▲7.71
Dashboard /wp-admin3.39 ▲0.0853.05 ▲1.52
Posts /wp-admin/edit.php3.51 ▲0.1553.39 ▲6.60
Add New Post /wp-admin/post-new.php3.20 ▼2.6838.74 ▼54.96
Media Library /wp-admin/upload.php3.29 ▲0.0634.93 ▼2.04
Add Carousel Images /wp-admin/post-new.php?post_type=simple-carousel3.1532.92
Carousel Images /wp-admin/edit.php?post_type=simple-carousel3.3639.36
Settings /wp-admin/edit.php?post_type=simple-carousel&page=simple-carousel-options3.2634.06

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
drt_scp_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Simple Carousel Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,086 ▲31515.26 ▲0.977.45 ▲5.2843.02 ▼2.52
Dashboard /wp-admin2,376 ▲1886.42 ▲0.54131.92 ▲7.6739.79 ▼5.53
Posts /wp-admin/edit.php2,285 ▲1963.43 ▲1.4454.62 ▲15.5636.28 ▼0.13
Add New Post /wp-admin/post-new.php1,556 ▲2323.02 ▼0.21628.69 ▼16.5036.13 ▼26.17
Media Library /wp-admin/upload.php1,421 ▲304.16 ▼0.0988.10 ▼18.0345.95 ▼1.22
Add Carousel Images /wp-admin/post-new.php?post_type=simple-carousel1,6713.5969.0031.49
Carousel Images /wp-admin/edit.php?post_type=simple-carousel1,2463.3943.5428.31
Settings /wp-admin/edit.php?post_type=simple-carousel&page=simple-carousel-options1,0613.1138.4828.21

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • drt_scp_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/post-new.php?post_type=simple-carousel
    • > Notice in wp-content/plugins/simple-carousel-slider/simple-carousel-slider.php+90
    Undefined index: post_type
    • > GET request to /wp-admin/post-new.php?post_type=simple-carousel
    • > Notice in wp-content/plugins/simple-carousel-slider/simple-carousel-slider.php+102
    Undefined index: post_title
    • > GET request to /wp-admin/post-new.php?post_type=simple-carousel
    • > Notice in wp-content/plugins/simple-carousel-slider/simple-carousel-slider.php+103
    Undefined index: scp_link
    • > GET request to /wp-admin/post-new.php?post_type=simple-carousel
    • > Notice in wp-content/plugins/simple-carousel-slider/simple-carousel-slider.php+104
    Undefined index: scp_image
    • > GET request to /wp-admin/post-new.php?post_type=simple-carousel
    • > Notice in wp-content/plugins/simple-carousel-slider/simple-carousel-slider.php+82
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/edit.php?post_type=simple-carousel&page=simple-carousel-options
    • > Notice in wp-content/plugins/simple-carousel-slider/simple-carousel-slider.php+141
    Undefined index: settings-updated

SRP 50% 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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-carousel-slider/simple-carousel-slider.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === simple-carousel-slider === )
You can take inspiration from this readme.txt

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

The main PHP file in "Simple Carousel Plugin" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
59 characters long description:
A simple plugin to add a carousel type slider to a website.

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 detected313 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP13224237
JavaScript29562
CSS12014

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin