74% nice-slider

Code Review | Nice Slider

WordPress plugin Nice Slider scored74%from 54 tests.

About plugin

  • Plugin page: nice-slider
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.9.1
  • WordPress version: 6.3.1
  • First release: Apr 20, 2022
  • Latest release: Apr 20, 2022
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: mohammedalamreety (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /326 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.92MB] [CPU: ▼56.93ms] Passed 4 tests

Server-side resources used by Nice Slider
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.404.51 ▼37.48
Dashboard /wp-admin2.09 ▼1.225.26 ▼49.82
Posts /wp-admin/edit.php2.09 ▼1.276.54 ▼44.73
Add New Post /wp-admin/post-new.php2.09 ▼3.806.16 ▼95.69
Media Library /wp-admin/upload.php2.09 ▼1.145.50 ▼29.94

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

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

Browser metrics Passed 4 tests

Nice Slider: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲7813.57 ▼1.052.53 ▲0.8245.15 ▲3.27
Dashboard /wp-admin2,242 ▲395.05 ▼0.7799.79 ▼18.3742.46 ▼5.03
Posts /wp-admin/edit.php2,121 ▲212.21 ▲0.2040.46 ▲3.3034.90 ▲1.23
Add New Post /wp-admin/post-new.php1,541 ▼417.74 ▼5.63618.10 ▼76.5950.35 ▼10.40
Media Library /wp-admin/upload.php1,421 ▲244.40 ▲0.2099.95 ▼3.7345.43 ▼2.46

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
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script 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 bootstrap-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/nice-slider/a-slider.php:19

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 96% from 29 tests

readme.txt Passed 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
2 plugin tags: slider post, slider

nice-slider/a-slider.php 92% from 13 tests

Analyzing the main PHP file in "Nice Slider" version 1.0
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("nice-slider.php" instead of "a-slider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin46,949 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
CSS168,13313835,086
JavaScript63,5051,61411,759
PHP13510104

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.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%
Functions4
▷ Named functions4100.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
No PNG files were detected