83% awesome-slider

Code Review | Awesome Slider

WordPress plugin Awesome Slider scored83%from 54 tests.

About plugin

  • Plugin page: awesome-slider
  • Plugin version: 1.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Mar 24, 2017
  • Latest release: Jan 17, 2019
  • Number of updates: 15
  • Update frequency: every 44.1 days
  • Top authors: raihancse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /691 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.23MB] [CPU: ▼6.85ms] Passed 4 tests

An overview of server-side resources used by Awesome Slider
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2144.87 ▲0.60
Dashboard /wp-admin3.60 ▲0.2557.99 ▼9.85
Posts /wp-admin/edit.php3.65 ▲0.2965.44 ▲7.33
Add New Post /wp-admin/post-new.php6.14 ▲0.2589.06 ▼23.85
Media Library /wp-admin/upload.php3.44 ▲0.2143.42 ▲5.72
All Sliders /wp-admin/edit.php?post_type=nivo_image_slider3.5141.69
Add New /wp-admin/post-new.php?post_type=nivo_image_slider3.5448.73

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

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

Browser metrics Passed 4 tests

Awesome Slider: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,038 ▲27714.79 ▲0.515.78 ▲3.8242.49 ▼5.86
Dashboard /wp-admin2,364 ▲1876.15 ▲0.48125.57 ▲23.5944.46 ▲0.43
Posts /wp-admin/edit.php2,292 ▲1923.39 ▲1.4355.67 ▲15.4037.34 ▲2.83
Add New Post /wp-admin/post-new.php1,550 ▲2423.61 ▲0.49658.95 ▼26.0339.29 ▼29.08
Media Library /wp-admin/upload.php1,426 ▲264.12 ▼0.0580.92 ▼35.9346.70 ▲0.43
All Sliders /wp-admin/edit.php?post_type=nivo_image_slider1,2393.3143.2327.05
Add New /wp-admin/post-new.php?post_type=nivo_image_slider2,0103.4775.0740.76

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/awesome-slider/includes/Nivo_Image_Slider_Meta_Box.php:479
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/awesome-slider/templates/gallery.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/awesome-slider/templates/url.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === awesome-slider === )
  • Screenshots: These screenshots require images: #1 (This is the first screen shot), #2 (This is the second screen shot), #3 (This is the six screen shot)
You can look at the official readme.txt

awesome-slider/nivo-image-slider.php 77% from 13 tests

The principal PHP file in "Awesome Slider" v. 1.4.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Domain Path: The domain path folder was not found ("/languages/")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("awesome-slider.php" instead of "nivo-image-slider.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
Good job! No executable or dangerous file extensions detected2,411 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP81692381,070
JavaScript29371628
Sass8830608
CSS1157105

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity15.00
▷ Minimum class complexity6.00
▷ Maximum class complexity43.00
Average method complexity2.49
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods47
▷ Static methods12.13%
▷ Public methods3063.83%
▷ Protected methods00.00%
▷ Private methods1736.17%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/default-arrows.png0.80KB0.51KB▼ 36.53%
assets/img/smooth-arrows.png3.06KB0.27KB▼ 91.14%
assets/img/dark-bullets.png3.07KB0.42KB▼ 86.27%
assets/img/light-bullets.png3.21KB0.54KB▼ 83.24%
assets/img/default-bullets.png1.25KB1.08KB▼ 13.74%