67% spice-post-slider

Code Review | Carousel, Recent Post Slider and Banner Slider

WordPress plugin Carousel, Recent Post Slider and Banner Slider scored67%from 54 tests.

About plugin

  • Plugin page: spice-post-slider
  • Plugin version: 2.0.1
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3.2
  • WordPress version: 6.3.1
  • First release: Nov 27, 2021
  • Latest release: Oct 20, 2023
  • Number of updates: 32
  • Update frequency: every 21.7 days
  • Top authors: spicethemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

7,000+ active /83,418 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲5.38MB] [CPU: ▲28.04ms] 75% from 4 tests

This is a short check of server-side resources used by Carousel, Recent Post Slider and Banner Slider
Please have a look at the following items
  • Extra RAM: The extra memory usage should kept under 5MB (currently 5.38MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.16 ▲5.7062.09 ▲22.82
Dashboard /wp-admin9.18 ▲5.8887.27 ▲37.55
Posts /wp-admin/edit.php9.19 ▲5.8385.49 ▲38.70
Add New Post /wp-admin/post-new.php10.01 ▲4.12121.90 ▲25.72
Media Library /wp-admin/upload.php9.18 ▲5.9663.07 ▲26.06
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius9.1863.91

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 252 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
fs_accounts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
fs_active_plugins
widget_recent-comments
can_compress_scripts
fs_debug_mode

Browser metrics Passed 4 tests

Checking browser requirements for Carousel, Recent Post Slider and Banner Slider
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,113 ▲35215.85 ▲1.436.04 ▲4.4776.95 ▲38.53
Dashboard /wp-admin2,402 ▲2246.81 ▲1.17122.05 ▲23.9743.75 ▼0.14
Posts /wp-admin/edit.php2,331 ▲2313.81 ▲1.8357.98 ▲22.8437.00 ▲1.97
Add New Post /wp-admin/post-new.php1,587 ▲6118.34 ▼5.39602.39 ▼89.0444.86 ▼6.63
Media Library /wp-admin/upload.php1,470 ▲674.65 ▲0.4881.28 ▼15.2248.03 ▲4.27
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,2933.5246.8027.93

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/spice-post-slider/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 9 options
    • can_compress_scripts
    • fs_debug_mode
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • fs_accounts
    • widget_recent-posts
    • widget_theysaidso_widget
    • fs_active_plugins

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/spice-post-slider/include/view/shortcode.php
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/spice-post-slider/include/view/banner-post-slider.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/spice-post-slider/include/admin/sps-meta-box.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/spice-post-slider/include/admin/sps-shortcode-generator.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/spice-post-slider/include/admin/sps-cpt.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/spice-post-slider/include/admin/sps-about-page.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/spice-post-slider/include/view/video-slider.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/spice-post-slider/include/admin/sps-fonts.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% 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
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Preview page), #2 (General setting page), #3 (Navigation setting page), #4 (Typography setting page), #5 (Color setting page), #6 (Add shortcode page)
Please take inspiration from this readme.txt

spice-post-slider/spice-post-slider.php 92% from 13 tests

"Carousel, Recent Post Slider and Banner Slider" version 2.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 187 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected55,351 lines of code in 161 files:
LanguageFilesBlank linesComment linesLines of code
PHP1268,05617,28234,633
SVG3009,552
JavaScript91,2714085,872
CSS221,664715,080
Markdown1680214

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity89.58
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.56
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes50
▷ Abstract classes24.00%
▷ Concrete classes4896.00%
▷ Final classes12.08%
Methods1,273
▷ Static methods19715.48%
▷ Public methods88469.44%
▷ Protected methods171.34%
▷ Private methods37229.22%
Functions105
▷ Named functions105100.00%
▷ Anonymous functions00.00%
Constants148
▷ Global constants10168.24%
▷ Class constants4731.76%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
27 compressed PNG files occupy 0.54MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/6.png22.48KB23.47KB0.00%
assets/img/7.png18.33KB19.30KB0.00%
assets/img/b-11.png26.23KB27.11KB0.00%
assets/img/2.png15.13KB15.50KB0.00%
assets/img/b-5.png21.42KB22.54KB0.00%