88% jquery-slider-with-text

Code Review | Spin Interactive Slider

WordPress plugin Spin Interactive Slider scored 88% from 54 tests.

About plugin

  • Plugin page: jquery-slider-wit...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9
  • WordPress version: 5.8.1
  • First release: Nov 2, 2015
  • Latest release: Dec 1, 2015
  • Number of updates: 10
  • Update frequency: every 3.2 days
  • Top authors: spininteractive (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 660 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼156.24ms] Passed 4 tests

An overview of server-side resources used by Spin Interactive Slider
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1443.57 ▲16.76
Dashboard /wp-admin3.08 ▲0.0242.71 ▼10.75
Posts /wp-admin/edit.php3.13 ▲0.0252.61 ▼1.45
Add New Post /wp-admin/post-new.php5.44 ▲0.00100.36 ▼612.08
Media Library /wp-admin/upload.php3.02 ▲0.0237.67 ▼0.66
Spin Interactive Slider /wp-admin/options-general.php?page=spin-interactive-slider2.9932.63

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Spin Interactive Slider
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,961 ▲36516.23 ▲0.3815.02 ▲5.3155.21 ▲4.17
Dashboard /wp-admin2,997 ▲665.98 ▲0.02153.77 ▼18.24135.61 ▲10.03
Posts /wp-admin/edit.php2,744 ▲52.69 ▼0.0172.90 ▼7.6695.84 ▼3.98
Add New Post /wp-admin/post-new.php1,686 ▲10518.40 ▲0.88430.16 ▼12.44121.79 ▲5.53
Media Library /wp-admin/upload.php1,812 ▲55.02 ▼0.01164.27 ▼21.98127.94 ▼1.17
Spin Interactive Slider /wp-admin/options-general.php?page=spin-interactive-slider1,0692.1061.7693.59

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/jquery-slider-with-text/spininteractive-slider.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to a member function query() on null in wp-content/plugins/jquery-slider-with-text/views/default.php:4
    • > PHP Fatal error
      Uncaught Error: Call to a member function query() on null in wp-content/plugins/jquery-slider-with-text/views/form.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes: The official readme.txt might help

jquery-slider-with-text/spininteractive-slider.php 92% from 13 tests

The main PHP file in "Spin Interactive Slider" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("jquery-slider-with-text.php" instead of "spininteractive-slider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected257 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP42633176
JavaScript110071
CSS10010

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods787.50%
▷ Public methods787.50%
▷ Protected methods00.00%
▷ Private methods112.50%
Functions0
▷ Named functions00.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/images/bg.png0.25KB0.09KB▼ 62.65%
inc/images/arrows.png5.63KB3.45KB▼ 38.77%