72% simpli-image-carousel

Code Review | Simpli Image Carousel

WordPress plugin Simpli Image Carousel scored72%from 54 tests.

About plugin

  • Plugin page: simpli-image-caro...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-5.8
  • WordPress version: 6.3.1
  • First release: Aug 13, 2021
  • Latest release: Aug 13, 2021
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: razaikhan (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /345 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.63MB] [CPU: ▼21.88ms] Passed 4 tests

Analyzing server-side resources used by Simpli Image Carousel
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0636.98 ▼0.46
Dashboard /wp-admin3.37 ▲0.0650.36 ▼3.46
Posts /wp-admin/edit.php3.42 ▲0.0655.83 ▲4.01
Add New Post /wp-admin/post-new.php3.20 ▼2.6941.03 ▼84.77
Media Library /wp-admin/upload.php3.29 ▲0.0637.39 ▲1.19
Add Simpli Images /wp-admin/post-new.php?post_type=simpli_carousel3.1534.45
All Simpli Images /wp-admin/edit.php?post_type=simpli_carousel3.3338.62
Simpli Category /wp-admin/edit-tags.php?taxonomy=simpli-category&post_type=simpli_carousel3.2832.58

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
arrows
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Simpli Image Carousel
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,850 ▲10413.13 ▼1.241.69 ▼0.5642.10 ▼0.53
Dashboard /wp-admin2,250 ▲655.79 ▼0.22101.25 ▼3.4741.40 ▼1.21
Posts /wp-admin/edit.php2,136 ▲471.97 ▼0.0240.56 ▼0.1635.27 ▼2.91
Add New Post /wp-admin/post-new.php1,572 ▲5323.19 ▼0.08688.38 ▲46.8853.34 ▼2.48
Media Library /wp-admin/upload.php1,435 ▲474.20 ▼0.0194.41 ▼9.8041.62 ▼5.16
Add Simpli Images /wp-admin/post-new.php?post_type=simpli_carousel1,7753.6467.0833.61
All Simpli Images /wp-admin/edit.php?post_type=simpli_carousel1,1001.9931.5829.60
Simpli Category /wp-admin/edit-tags.php?taxonomy=simpli-category&post_type=simpli_carousel1,3062.1428.7229.38

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/post-new.php?post_type=simpli_carousel
    • > Warning in wp-content/plugins/simpli-image-carousel/simpli_carousel.php+197
    define() expects at least 2 parameters, 1 given
    • > GET request to /wp-admin/post-new.php?post_type=simpli_carousel
    • > Notice in wp-content/plugins/simpli-image-carousel/simpli_carousel.php+200
    Trying to get property 'ID' of non-object
    • > GET request to /wp-admin/post-new.php?post_type=simpli_carousel
    • > Notice in wp-content/plugins/simpli-image-carousel/simpli_carousel.php+200
    Undefined index: sic_title_checkbox
    • > GET request to /wp-admin/post-new.php?post_type=simpli_carousel
    • > Notice in wp-content/plugins/simpli-image-carousel/simpli_carousel.php+188
    Undefined variable: sic_title_checkbox_val

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/simpli-image-carousel/simpli_carousel.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/simpli-image-carousel/views/header_sic.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/simpli-image-carousel/views/footer_sic.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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
Please fix the following attributes: You can look at the official readme.txt

simpli-image-carousel/simpli_carousel.php 85% from 13 tests

The primary PHP file in "Simpli Image Carousel" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 157 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("simpli-image-carousel.php" instead of "simpli_carousel.php")

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 plugin425 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP33129222
JavaScript6923148
CSS371455

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
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 functions981.82%
▷ Anonymous functions218.18%
Constants1
▷ Global constants1100.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
No PNG files were detected