84% x-slider

Code Review | X-Slider

WordPress plugin X-Slider scored84%from 54 tests.

About plugin

  • Plugin page: x-slider
  • Plugin version: 1.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.2-4.4.1
  • WordPress version: 6.3.1
  • First release: Nov 10, 2015
  • Latest release: Jan 7, 2016
  • Number of updates: 29
  • Update frequency: every 2.0 days
  • Top authors: hugooodias (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,985 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
Install script ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼3.86ms] Passed 4 tests

Server-side resources used by X-Slider
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1044.91 ▲3.33
Dashboard /wp-admin3.49 ▲0.1457.17 ▼7.29
Posts /wp-admin/edit.php3.54 ▲0.1955.91 ▲5.29
Add New Post /wp-admin/post-new.php6.01 ▲0.1392.44 ▼12.40
Media Library /wp-admin/upload.php3.33 ▲0.1035.54 ▲0.94

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
x_slider_layout_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for X-Slider
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,079 ▲31815.39 ▲1.226.25 ▲4.2542.33 ▲2.23
Dashboard /wp-admin2,362 ▲1566.44 ▲0.58119.53 ▲15.6090.06 ▲47.67
Posts /wp-admin/edit.php2,282 ▲1823.38 ▲1.3346.13 ▲4.1564.95 ▲22.95
Add New Post /wp-admin/post-new.php6,285 ▲4,75926.01 ▲8.38908.00 ▲255.3745.08 ▼9.00
Media Library /wp-admin/upload.php1,422 ▲194.13 ▼0.2084.87 ▼13.8267.59 ▲22.55

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • x_slider_layout_options
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% 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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/x-slider/admin/views/admin.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: slider

x-slider/x-slider.php Passed 13 tests

The main PHP file in "X-Slider" ver. 1.4.2 adds more information about the plugin and also serves as the entry point for this plugin
43 characters long description:
Simple and lightweight slider for Wordpress

Code Analysis Passed 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
Everything looks great! No dangerous files found in this plugin1,025 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP4182383529
JavaScript35887298
CSS391111
Sass11087

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity1.61
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods36
▷ Static methods00.00%
▷ Public methods3391.67%
▷ Protected methods00.00%
▷ Private methods38.33%
Functions4
▷ Named functions4100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/icon.png0.81KB0.61KB▼ 24.79%