10% nivo-slider-widget

Code Review | Nivo Slider Widget

WordPress plugin Nivo Slider Widget scored10%from 54 tests.

About plugin

  • Plugin page: nivo-slider-widget
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Apr 25, 2013
  • Latest release: Apr 29, 2013
  • Number of updates: 5
  • Update frequency: every 1.0 days
  • Top authors: Ch1pStar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /3,317 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-includes/plugin.php+1001
    Undefined offset: 0

Server metrics [RAM: ▼1.96MB] [CPU: ▼71.44ms] Passed 4 tests

Server-side resources used by Nivo Slider Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.446.40 ▼40.22
Dashboard /wp-admin2.05 ▼1.266.70 ▼49.07
Posts /wp-admin/edit.php2.05 ▼1.315.72 ▼47.40
Add New Post /wp-admin/post-new.php2.05 ▼3.845.39 ▼145.81
Media Library /wp-admin/upload.php2.05 ▼1.1810.23 ▼43.46

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Nivo Slider Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲12213.81 ▼0.3413.01 ▲10.4655.42 ▼9.38
Dashboard /wp-admin2,191 ▲115.74 ▲0.11122.40 ▲19.3055.88 ▲11.25
Posts /wp-admin/edit.php2,113 ▲102.28 ▲0.2865.14 ▲20.8647.66 ▲1.50
Add New Post /wp-admin/post-new.php1,404 ▼017.56 ▼0.48674.16 ▼229.2966.86 ▼8.25
Media Library /wp-admin/upload.php1,406 ▲34.25 ▼0.06162.02 ▼13.2969.95 ▼6.08

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
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the nivo_default_css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_nivosliderwidget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

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
Good news, no errors were detected

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/nivo-slider-widget/nivo-slider-widget.php:13

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 93% 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
Attributes that require attention:
  • Donate link: Invalid url: ""
  • Screenshots: Screenshot #1 (`/assets/screenshot-1.png`) image missing
You can look at the official readme.txt

nivo-slider-widget/nivo-slider-widget.php Passed 13 tests

The entry point to "Nivo Slider Widget" version 1.0 is a PHP file that has certain tags in its header comment area
28 characters long description:
A Nivo Slider Widget plugin.

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 detected801 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript49574553
CSS2823165
PHP1441080
Markdown1103

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity2.50
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.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.46MB with 0.19MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
slider_css/arrows.png0.80KB0.51KB▼ 36.53%
assets/screenshot-1.png471.34KB121.10KB▼ 74.31%
slider_css/bullets.png1.25KB1.08KB▼ 13.74%