84% nanoslider

Code Review | Nano Slider

WordPress plugin Nano Slider scored 84% from 54 tests.

About plugin

  • Plugin page: nanoslider
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6.1
  • WordPress version: 5.9.2
  • First release: Oct 24, 2013
  • Latest release: Oct 24, 2013
  • Number of updates: 14
  • Update frequency: every 0.5 days
  • Top authors: nanoslider (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 5,898 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼296.84ms] Passed 4 tests

Server-side resources used by Nano Slider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1257.75 ▲3.01
Dashboard /wp-admin3.51 ▲0.1032.88 ▼1.22
Posts /wp-admin/edit.php3.74 ▲0.0939.48 ▲1.20
Add New Post /wp-admin/post-new.php6.98 ▲0.0196.89 ▼1,180.51
Media Library /wp-admin/upload.php3.39 ▲0.0824.84 ▼6.81
Add New /wp-admin/post-new.php?post_type=nano-slider3.7244.08
Settings /wp-admin/edit.php?post_type=nano-slider&page=nano-settings-menu3.3625.52
Nano Slider /wp-admin/edit.php?post_type=nano-slider3.4326.61

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 14 new options
New WordPress options
nano_effect
nano_height
nano_randomStart
nano_animSpeed
widget_nano_widget
nano_width
nano_slices
nano_directionNav
nano_boxRows
nano_pauseTime
...

Browser metrics Passed 4 tests

An overview of browser requirements for Nano Slider
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,920 ▲17516.23 ▲0.659.32 ▲2.942.23 ▼1.04
Dashboard /wp-admin2,925 ▲706.04 ▼0.15119.68 ▼18.48157.74 ▼4.65
Posts /wp-admin/edit.php2,730 ▲403.24 ▲0.0165.17 ▲1.64142.00 ▼2.15
Add New Post /wp-admin/post-new.php1,716 ▼3821.00 ▼0.04433.52 ▼7.85156.33 ▼2.67
Media Library /wp-admin/upload.php1,735 ▲405.56 ▲0.04145.36 ▼5.73186.73 ▼11.34
Add New /wp-admin/post-new.php?post_type=nano-slider2,2315.3194.09131.46
Settings /wp-admin/edit.php?post_type=nano-slider&page=nano-settings-menu1,4562.3953.94121.17
Nano Slider /wp-admin/edit.php?post_type=nano-slider1,4063.1560.54112.37

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
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_nano_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/nanoslider/nano-slider.php:36

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 25 tag instead of maximum 10
You can look at the official readme.txt

nanoslider/nano-slider.php 92% from 13 tests

The main PHP script in "Nano Slider" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("nanoslider.php" instead of "nano-slider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,117 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript18763633
PHP15514312
CSS266172

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
themes/default/bullets.png1.25KB1.08KB▼ 13.74%
themes/default/arrows.png0.80KB0.51KB▼ 36.53%