84% srtk-auto-image-slider-widget

Code Review | SRTK Auto Image Slider Widget

WordPress plugin SRTK Auto Image Slider Widget scored84%from 54 tests.

About plugin

  • Plugin page: srtk-auto-image-s...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.4
  • WordPress version: 6.3.1
  • First release: Mar 19, 2016
  • Latest release: Mar 19, 2016
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: srthk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /873 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.51ms] Passed 4 tests

Server-side resources used by SRTK Auto Image Slider Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.76 ▼3.71
Dashboard /wp-admin3.34 ▲0.0344.83 ▼0.93
Posts /wp-admin/edit.php3.39 ▲0.0347.05 ▲2.97
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.83 ▼6.42
Media Library /wp-admin/upload.php3.26 ▲0.0335.13 ▲1.01

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_autoimageslider_widget

Browser metrics Passed 4 tests

A check of browser resources used by SRTK Auto Image Slider Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.47 ▼0.042.27 ▲0.4041.50 ▼4.07
Dashboard /wp-admin2,203 ▲155.83 ▲0.8997.56 ▼15.1839.68 ▲2.77
Posts /wp-admin/edit.php2,092 ▼02.04 ▲0.0139.49 ▼4.1235.81 ▼4.51
Add New Post /wp-admin/post-new.php1,519 ▼023.40 ▲0.31655.36 ▼7.5756.47 ▼4.13
Media Library /wp-admin/upload.php1,385 ▼34.22 ▲0.0595.01 ▼9.6443.60 ▼0.84

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_autoimageslider_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/srtk-auto-image-slider-widget/auto_image_slider.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% 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
4 plugin tags: image, javascript, slider, widget

srtk-auto-image-slider-widget/auto_image_slider.php 85% from 13 tests

The entry point to "SRTK Auto Image Slider Widget" version 1.0 is a PHP file that has certain tags in its header comment area
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 ("srtk-auto-image-slider-widget.php" instead of "auto_image_slider.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected152 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13747104
JavaScript112030
CSS10018

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity5.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%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.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
No PNG images were found in this plugin