78% infinite-slider

Code Review | Infinite Slider

WordPress plugin Infinite Slider scored78%from 54 tests.

About plugin

  • Plugin page: infinite-slider
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.0
  • WordPress version: 6.3.1
  • First release: Mar 30, 2014
  • Latest release: Sep 4, 2014
  • Number of updates: 12
  • Update frequency: every 13.2 days
  • Top authors: kinstahosting (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

70+ active /13,492 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.43MB] [CPU: ▼8.63ms] Passed 4 tests

This is a short check of server-side resources used by Infinite Slider
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1829.58 ▼13.34
Dashboard /wp-admin3.86 ▲0.5550.50 ▼1.62
Posts /wp-admin/edit.php3.91 ▲0.5552.42 ▼0.75
Add New Post /wp-admin/post-new.php6.38 ▲0.4989.37 ▼18.79
Media Library /wp-admin/upload.php3.72 ▲0.4943.17 ▲7.23
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins3.7835.82

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 137 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Infinite Slider
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,936 ▲17513.55 ▼0.8511.20 ▲9.2142.23 ▼1.17
Dashboard /wp-admin2,239 ▲625.53 ▼0.0283.29 ▼8.5244.10 ▲0.78
Posts /wp-admin/edit.php2,156 ▲562.06 ▼0.0538.57 ▼0.0142.84 ▲5.85
Add New Post /wp-admin/post-new.php1,582 ▲5123.40 ▲0.34645.40 ▼35.4157.48 ▲4.42
Media Library /wp-admin/upload.php1,452 ▲494.22 ▲0.03100.32 ▼3.0548.70 ▲2.69
Install Plugins /wp-admin/themes.php?page=tgmpa-install-plugins9462.0925.2426.80

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/infinite-slider/public/includes/cmb/tests/phpunit/includes/bootstrap.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/infinite-slider/public/includes/cmb/init.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/infinite-slider/public/includes/cmb/example-functions.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/infinite-slider/admin/includes/class-tgm-plugin-activation.php:161
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/infinite-slider/public/includes/cmb/tests/phpunit/tests/CMB_Core_Test.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

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
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can look at the official readme.txt

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

The main PHP script in "Infinite Slider" version 2.0.1 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected9,269 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP151,0332,2243,794
JavaScript75104623,510
CSS498211,552
Markdown3890288
Bourne Shell115459
JSON10031
YAML15018
XML10117

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity51.31
▷ Minimum class complexity1.00
▷ Maximum class complexity136.00
Average method complexity4.10
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods211
▷ Static methods4420.85%
▷ Public methods19893.84%
▷ Protected methods83.79%
▷ Private methods52.37%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants250.00%
▷ Class constants250.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
88 PNG files occupy 0.35MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/assets/img/fullscreen.png3.60KB0.79KB▼ 78.08%
public/includes/cmb/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
public/assets/img/blackdots120x120.png3.22KB0.34KB▼ 89.29%
public/assets/img/blackdots240x240.png3.66KB0.51KB▼ 86.14%
public/assets/img/360x360.png4.42KB0.48KB▼ 89.10%