10% nivo-slider-simplified

Code Review | Nivo Slider Simplified

WordPress plugin Nivo Slider Simplified scored10%from 54 tests.

About plugin

  • Plugin page: nivo-slider-simpl...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2.2
  • WordPress version: 6.3.1
  • First release: Aug 11, 2014
  • Latest release: May 12, 2015
  • Number of updates: 8
  • Update frequency: every 37.3 days
  • Top authors: ajay3085006 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /6,760 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/nivo-slider-simplified/nivo_slider_simplified.php+43
    Use of undefined constant nivo_slider_simplified_options - assumed 'nivo_slider_simplified_options' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▲0.18MB] [CPU: ▼4.24ms] Passed 4 tests

An overview of server-side resources used by Nivo Slider Simplified
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1739.91 ▼4.59
Dashboard /wp-admin3.49 ▲0.1848.80 ▼1.47
Posts /wp-admin/edit.php3.60 ▲0.2451.48 ▼2.20
Add New Post /wp-admin/post-new.php6.09 ▲0.2088.55 ▼8.71
Media Library /wp-admin/upload.php3.41 ▲0.1838.67 ▲4.62
All Nivo Slides /wp-admin/edit.php?post_type=nivo_slides3.4540.73
All Nivo Sliders /wp-admin/edit.php?post_type=nivo_sliders3.4536.27
Default Setting /wp-admin/admin.php?page=nivo_slider_simplified_sub3.3533.25

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 38 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
nivo_slider_simplified_options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Nivo Slider Simplified
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,981 ▲22013.72 ▼0.935.45 ▲3.6742.07 ▲2.13
Dashboard /wp-admin2,268 ▲654.93 ▼0.1297.95 ▼9.3038.38 ▼4.94
Posts /wp-admin/edit.php2,151 ▲512.29 ▲0.2840.48 ▲5.2235.16 ▲2.46
Add New Post /wp-admin/post-new.php1,569 ▲3823.17 ▼0.16671.13 ▲34.6366.06 ▲20.19
Media Library /wp-admin/upload.php1,444 ▲444.29 ▲0.02108.35 ▲1.9947.01 ▲0.12
All Nivo Slides /wp-admin/edit.php?post_type=nivo_slides1,1242.1942.5331.21
All Nivo Sliders /wp-admin/edit.php?post_type=nivo_sliders1,1042.2133.4828.71
Default Setting /wp-admin/admin.php?page=nivo_slider_simplified_sub1,0861.9725.1629.25

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=nivo_slider_simplified_sub
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/admin.php?page=nivo_slider_simplified_sub
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/admin.php?page=nivo_slider_simplified_sub
    • > Warning in wp-content/plugins/nivo-slider-simplified/admin/options_nivo.php+316
    Use of undefined constant sliceDown - assumed 'sliceDown' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=nivo_slider_simplified_sub
    • > Warning in wp-content/plugins/nivo-slider-simplified/admin/options_nivo.php+317
    Use of undefined constant sliceDownLeft - assumed 'sliceDownLeft' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=nivo_slider_simplified_sub
    • > Warning in wp-content/plugins/nivo-slider-simplified/admin/options_nivo.php+318
    Use of undefined constant sliceUp - assumed 'sliceUp' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=nivo_slider_simplified_sub
    • > Warning in wp-content/plugins/nivo-slider-simplified/admin/options_nivo.php+319
    Use of undefined constant sliceUpLeft - assumed 'sliceUpLeft' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=nivo_slider_simplified_sub
    • > Warning in wp-content/plugins/nivo-slider-simplified/admin/options_nivo.php+320
    Use of undefined constant sliceUpDown - assumed 'sliceUpDown' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=nivo_slider_simplified_sub
    • > Warning in wp-content/plugins/nivo-slider-simplified/admin/options_nivo.php+321
    Use of undefined constant sliceUpDownLeft - assumed 'sliceUpDownLeft' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=nivo_slider_simplified_sub
    • > Warning in wp-content/plugins/nivo-slider-simplified/admin/options_nivo.php+322
    Use of undefined constant fold - assumed 'fold' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=nivo_slider_simplified_sub
    • > Warning in wp-content/plugins/nivo-slider-simplified/admin/options_nivo.php+323
    Use of undefined constant fade - assumed 'fade' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=nivo_slider_simplified_sub
    • > Warning in wp-content/plugins/nivo-slider-simplified/admin/options_nivo.php+324
    Use of undefined constant random - assumed 'random' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=nivo_slider_simplified_sub
    • > Warning in wp-content/plugins/nivo-slider-simplified/admin/options_nivo.php+325
    Use of undefined constant slideInRight - assumed 'slideInRight' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=nivo_slider_simplified_sub
    • > Warning in wp-content/plugins/nivo-slider-simplified/admin/options_nivo.php+326
    Use of undefined constant slideInLeft - assumed 'slideInLeft' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=nivo_slider_simplified_sub
    • > Warning in wp-content/plugins/nivo-slider-simplified/admin/options_nivo.php+327
    Use of undefined constant boxRandom - assumed 'boxRandom' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=nivo_slider_simplified_sub
    • > Warning in wp-content/plugins/nivo-slider-simplified/admin/options_nivo.php+328
    Use of undefined constant boxRain - assumed 'boxRain' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=nivo_slider_simplified_sub
    • > Warning in wp-content/plugins/nivo-slider-simplified/admin/options_nivo.php+329
    Use of undefined constant boxRainReverse - assumed 'boxRainReverse' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=nivo_slider_simplified_sub
    • > Warning in wp-content/plugins/nivo-slider-simplified/admin/options_nivo.php+330
    Use of undefined constant boxRainGrow - assumed 'boxRainGrow' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=nivo_slider_simplified_sub
    • > Warning in wp-content/plugins/nivo-slider-simplified/admin/options_nivo.php+331
    Use of undefined constant boxRainGrowReverse - assumed 'boxRainGrowReverse' (this will throw an Error in a future version of PHP)

SRP 50% 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
Please fix the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/nivo-slider-simplified/admin/options_nivo.php:461
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nivo-slider-simplified/inc/functions_nivo.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nivo-slider-simplified/inc/functions_nivo.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nivo-slider-simplified/inc/class.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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:
  • Screenshots: Add images for these screenshots: #1 (User view after installation), #2 (Admin Default setting page), #3 (List of nivo slides), #4 (List of Slider with shortcodes), #5 (A slider with image drag and drop)
Please take inspiration from this readme.txt

nivo-slider-simplified/nivo_slider_simplified.php 85% from 13 tests

The primary PHP file in "Nivo Slider Simplified" version 0.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("nivo-slider-simplified.php" instead of "nivo_slider_simplified.php")
  • Description: The description should be shorter than 140 characters (currently 271 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected1,858 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP4246193715
CSS74795589
JavaScript38380554

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity13.50
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
19 PNG files occupy 1.51MB with 0.90MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png49.87KB26.01KB▼ 47.84%
css/themes/light/arrows.png3.17KB0.52KB▼ 83.49%
screenshot_2.png72.19KB38.49KB▼ 46.68%
css/themes/default/arrows.png0.80KB0.51KB▼ 36.53%
css/themes/light/bullets.png3.21KB0.54KB▼ 83.24%