10% nextgen-nivoslider

Code Review | NextGen NivoSlider

WordPress plugin NextGen NivoSlider scored10%from 54 tests.

About plugin

  • Plugin page: nextgen-nivoslider
  • Plugin version: 3.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.6.1
  • WordPress version: 6.3.1
  • First release: Mar 31, 2013
  • Latest release: Oct 3, 2013
  • Number of updates: 32
  • Update frequency: every 5.8 days
  • Top authors: paperfeed (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

500+ active /26,160 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/nextgen-nivoslider/includes/ngg-nivoslider-main.php+14
    Function create_function() is deprecated

Server metrics [RAM: ▼1.72MB] [CPU: ▼51.35ms] Passed 4 tests

Analyzing server-side resources used by NextGen NivoSlider
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.27 ▼1.196.52 ▼32.42
Dashboard /wp-admin2.29 ▼1.017.14 ▼42.84
Posts /wp-admin/edit.php2.29 ▼1.077.14 ▼39.99
Add New Post /wp-admin/post-new.php2.29 ▼3.607.23 ▼90.14
Media Library /wp-admin/upload.php2.29 ▼0.946.68 ▼27.26
Nivo Slider /wp-admin/admin.php?page=nextgen-nivoslider/includes/ngg-nivoslider-admin.php2.296.62

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 8 new options
New WordPress options
ngg_nivoslider_theme
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_nextgen-nivoslider
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for NextGen NivoSlider
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.18 ▼1.401.66 ▼0.1744.86 ▼0.18
Dashboard /wp-admin2,206 ▲184.86 ▼0.03110.75 ▲1.1638.68 ▼3.94
Posts /wp-admin/edit.php2,086 ▼32.02 ▼0.0440.74 ▲4.4136.37 ▲2.78
Add New Post /wp-admin/post-new.php1,533 ▲1923.06 ▲5.51689.72 ▲72.2855.29 ▲11.53
Media Library /wp-admin/upload.php1,385 ▼64.22 ▲0.0396.59 ▼2.8442.32 ▼0.39
Nivo Slider /wp-admin/admin.php?page=nextgen-nivoslider/includes/ngg-nivoslider-admin.php8122.0325.6522.77

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/nextgen-nivoslider/includes/ngg-nivoslider-main.php+14
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_nextgen-nivoslider
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • ngg_nivoslider_theme
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=nextgen-nivoslider/includes/ngg-nivoslider-admin.php
    • > Deprecated in wp-content/plugins/nextgen-nivoslider/includes/ngg-nivoslider-main.php+14
    Function create_function() is deprecated
    • > GET request to /wp-admin/admin.php?page=nextgen-nivoslider/includes/ngg-nivoslider-admin.php
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in NGG_NivoSlider_Widget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/admin.php?page=nextgen-nivoslider/includes/ngg-nivoslider-admin.php
    • > 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=nextgen-nivoslider/includes/ngg-nivoslider-admin.php
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% 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
Please fix the following
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      require_once(WPNGG_NIVOSLIDER_PLUGIN_DIR/includes/ngg-nivoslider-widget.php): failed to open stream: No such file or directory in wp-content/plugins/nextgen-nivoslider/includes/ngg-nivoslider-main.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/nextgen-nivoslider/includes/ngg-nivoslider-widget.php:3
    • > PHP Fatal error
      require_once(): Failed opening required 'WPNGG_NIVOSLIDER_PLUGIN_DIR/includes/ngg-nivoslider-widget.php' (include_path='.:/usr/share/php') in wp-content/plugins/nextgen-nivoslider/includes/ngg-nivoslider-main.php on line 3
    • > PHP Warning
      Use of undefined constant WPNGG_NIVOSLIDER_PLUGIN_DIR - assumed 'WPNGG_NIVOSLIDER_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/nextgen-nivoslider/includes/ngg-nivoslider-main.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/nextgen-nivoslider/ngg-nivoslider.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_option() in wp-content/plugins/nextgen-nivoslider/includes/ngg-nivoslider-admin.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: There are too many tags (12 tag instead of maximum 10)
  • Screenshots: Screenshot #1 (The NextGen NivoSlider widget configuration panel) image missing
Please take inspiration from this readme.txt

nextgen-nivoslider/ngg-nivoslider.php 92% from 13 tests

The main PHP file in "NextGen NivoSlider" ver. 3.2.7 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("nextgen-nivoslider.php" instead of "ngg-nivoslider.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
There were no executable files found in this plugin2,872 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP52271601,727
JavaScript28065579
CSS62859566

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity79.25
▷ Minimum class complexity5.00
▷ Maximum class complexity206.00
Average method complexity6.59
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods56
▷ Static methods35.36%
▷ Public methods1933.93%
▷ Protected methods3053.57%
▷ Private methods712.50%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants49
▷ Global constants49100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
11 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
themes/bar/bullets.png1.25KB1.08KB▼ 13.74%
themes/default/bullets.png1.25KB1.08KB▼ 13.74%
themes/light/bullets.png3.21KB0.54KB▼ 83.24%
themes/bar/arrows.png0.80KB0.51KB▼ 36.53%
themes/light/arrows.png3.17KB0.52KB▼ 83.49%