72% slider-seo

Code Review | Slider SEO

WordPress plugin Slider SEO scored 72% from 54 tests.

About plugin

  • Plugin page: slider-seo
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.5.3
  • WordPress version: 5.8.1
  • First release: Apr 19, 2016
  • Latest release: Aug 8, 2016
  • Number of updates: 34
  • Update frequency: every 3.3 days
  • Top authors: fervillz (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

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

Server metrics [RAM: ▲0.17MB] [CPU: ▼163.76ms] Passed 4 tests

Analyzing server-side resources used by Slider SEO
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.96 ▲0.2433.96 ▲11.01
Dashboard /wp-admin3.28 ▲0.2246.23 ▲1.05
Posts /wp-admin/edit.php3.32 ▲0.2150.03 ▲4.82
Add New Post /wp-admin/post-new.php5.55 ▲0.1199.50 ▼661.36
Media Library /wp-admin/upload.php3.13 ▲0.1334.55 ▲0.45
All Slider Items /wp-admin/edit.php?post_type=slider_seo3.2038.80
Add New Slider /wp-admin/post-new.php?post_type=slider_seo3.4742.37

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 56 new files
Database: no new tables, 1 new option
New WordPress options
recovery_mode_email_last_sent

Browser metrics Passed 4 tests

Slider SEO: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,090 ▲49418.23 ▲2.5612.20 ▲1.0846.42 ▼0.15
Dashboard /wp-admin3,233 ▲3028.16 ▲2.18161.58 ▲14.25108.13 ▼7.10
Posts /wp-admin/edit.php3,034 ▲2954.49 ▲1.7885.14 ▲17.7187.50 ▼1.19
Add New Post /wp-admin/post-new.php1,921 ▲42119.18 ▲0.22402.72 ▲16.40110.51 ▲1.42
Media Library /wp-admin/upload.php1,880 ▲735.05 ▲0.03114.95 ▼35.02123.61 ▲1.09
All Slider Items /wp-admin/edit.php?post_type=slider_seo1,7494.4783.2478.55
Add New Slider /wp-admin/post-new.php?post_type=slider_seo1,4272.2939.6388.89

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 1 option
    • recovery_mode_email_last_sent

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/post-new.php?post_type=slider_seo
    • > Warning in wp-content/plugins/slider-seo/admin/views/admin_gsettings.php+13
    include_once(gsettings_partials/autoplay.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/post-new.php?post_type=slider_seo
    • > Warning in wp-content/plugins/slider-seo/admin/views/admin_gsettings.php+13
    include_once(): Failed opening 'gsettings_partials/autoplay.php' for inclusion (include_path='.:/usr/share/php')
    • > GET request to /wp-admin/post-new.php?post_type=slider_seo
    • > Error in wp-content/plugins/slider-seo/admin/views/admin_gsettings.php+44
    Uncaught Error: Call to undefined function autoplay() in wp-content/plugins/slider-seo/admin/views/admin_gsettings.php:44
    Stack trace:
    #0 wp-content/plugins/slider-seo/admin/slider-seo-admin.php(390): include_once()
    #1 wp-admin/includes/template.php(1395): Slider_SEO_Admin->display_main_metabox_gsettings()
    #2 wp-admin/edit-form-advanced.php(681): do_meta_boxes()
    #3 wp-admin/post-new.php(75): require('/var/www/wordpr...')
    #4 {main}
    thrown

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 18× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/slider-seo/admin/views/gsettings_partials/slider_type.php
    • > /wp-content/plugins/slider-seo/admin/views/gsettings_partials/autoWidth.php
    • > /wp-content/plugins/slider-seo/admin/views/gsettings_partials/lazyload.php
    • > /wp-content/plugins/slider-seo/admin/views/gsettings_partials/autoheight.php
    • > /wp-content/plugins/slider-seo/admin/views/gsettings_partials/captionPos.php
    • > /wp-content/plugins/slider-seo/admin/views/gsettings_partials/navigation.php
    • > /wp-content/plugins/slider-seo/admin/views/gsettings_partials/width_height.php
    • > /wp-content/plugins/slider-seo/admin/views/gsettings_partials/animation.php
    • > /wp-content/plugins/slider-seo/admin/views/gsettings_partials/navPos.php
    • > /wp-content/plugins/slider-seo/admin/views/gsettings_partials/margin.php
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: post in wp-content/plugins/slider-seo/admin/views/admin_shortcode.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/slider-seo/admin/includes/add_post_column.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/slider-seo/admin/includes/add_post_type.php:55
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/slider-seo/admin/views/admin_shortcode.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_meta_box() in wp-content/plugins/slider-seo/admin/includes/add_meta_box.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/slider-seo/admin/views/admin.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/slider-seo/admin/slider-seo-template.php:1
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/slider-seo/admin/views/admin_shortcode.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/slider-seo/admin/includes/slider_seo_shortcode.php:208
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/slider-seo/admin/views/admin_gsettings.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: A description for screenshot #3 is required in slider-seo/assets to your readme.txt
  • Tags: Please reduce the number of tags, currently 36 tag instead of maximum 10
The official readme.txt is a good inspiration

slider-seo/slider-seo.php 92% from 13 tests

The primary PHP file in "Slider SEO" version 1.2.2 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 160 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin7,378 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
CSS5677403,748
JavaScript176681,0452,349
PHP303552411,281

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity1.84
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods1789.47%
▷ Protected methods00.00%
▷ Private methods210.53%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
There are no PNG files in this plugin