78% d-slider

Code Review | D Slider

WordPress plugin D Slider scored78%from 54 tests.

About plugin

  • Plugin page: d-slider
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Dec 30, 2015
  • Latest release: Dec 31, 2015
  • Number of updates: 12
  • Update frequency: every 0.1 days
  • Top authors: dinar19 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /714 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 gracefully, with no errors

Server metrics [RAM: ▼0.64MB] [CPU: ▼17.56ms] Passed 4 tests

Server-side resources used by D Slider
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0838.44 ▼6.99
Dashboard /wp-admin3.36 ▲0.0253.40 ▼8.56
Posts /wp-admin/edit.php3.41 ▲0.0650.43 ▼2.66
Add New Post /wp-admin/post-new.php3.19 ▼2.6936.36 ▼52.04
Media Library /wp-admin/upload.php3.28 ▲0.0540.21 ▲8.13
Sliders /wp-admin/edit.php?post_type=slidesjs_slider3.3338.24
Add New /wp-admin/post-new.php?post_type=slidesjs_slider3.1434.73

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

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

Browser metrics Passed 4 tests

A check of browser resources used by D Slider
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,925 ▲17913.45 ▼0.928.28 ▲6.7355.55 ▲14.90
Dashboard /wp-admin2,235 ▲585.63 ▼0.0090.16 ▼26.8842.55 ▼11.66
Posts /wp-admin/edit.php2,146 ▲431.95 ▼0.0839.48 ▲0.2638.49 ▲0.67
Add New Post /wp-admin/post-new.php1,584 ▲4717.92 ▼5.16626.85 ▲28.0479.01 ▲30.42
Media Library /wp-admin/upload.php1,443 ▲434.17 ▼0.0198.23 ▼7.0244.22 ▼0.75
Sliders /wp-admin/edit.php?post_type=slidesjs_slider1,1241.9032.7830.31
Add New /wp-admin/post-new.php?post_type=slidesjs_slider2,2907.58181.2865.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/post-new.php?post_type=slidesjs_slider
    • > Notice in wp-content/plugins/d-slider/d_slider.php+202
    Undefined index: d_slider_box_nonce
    • > GET request to /wp-admin/post-new.php?post_type=slidesjs_slider
    • > Notice in wp-content/plugins/d-slider/d_slider.php+171
    Undefined offset: 0
    • > GET request to /wp-admin/post-new.php?post_type=slidesjs_slider
    • > Notice in wp-content/plugins/d-slider/d_slider.php+175
    Undefined offset: 1
    • > GET request to /wp-admin/post-new.php?post_type=slidesjs_slider
    • > Notice in wp-content/plugins/d-slider/d_slider.php+179
    Undefined offset: 2
    • > GET request to /wp-admin/post-new.php?post_type=slidesjs_slider
    • > Notice in wp-content/plugins/d-slider/d_slider.php+183
    Undefined offset: 3
    • > GET request to /wp-admin/post-new.php?post_type=slidesjs_slider
    • > Notice in wp-content/plugins/d-slider/d_slider.php+187
    Undefined offset: 4

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/d-slider/d_slider.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
These attributes need your attention:
  • Screenshots: These screenshots need descriptions #0, #0 in d-slider/assets to your readme.txt
  • Screenshots: These screenshots require images: #1 (Slider Images), #2 (Slider Settings)
You can take inspiration from this readme.txt

d-slider/d_slider.php 92% from 13 tests

The principal PHP file in "D Slider" v. 2.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("d-slider.php" instead of "d_slider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,975 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS266631,484
SVG100284
PHP17519195
JavaScript241112

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.40MB with 0.26MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot1.png377.29KB90.25KB▼ 76.08%
screenshot2.png33.90KB13.07KB▼ 61.43%
img/pagination.png1.36KB0.58KB▼ 57.53%