78% simple-pictures-slider

Code Review | Simple Pictures Slider

WordPress plugin Simple Pictures Slider scored78%from 54 tests.

About plugin

  • Plugin page: simple-pictures-s...
  • Plugin version: 1.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.3.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Oct 26, 2022
  • Latest release: Nov 3, 2023
  • Number of updates: 14
  • Update frequency: every 26.7 days
  • Top authors: tombgtn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /411 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.47MB] [CPU: ▼2.44ms] Passed 4 tests

Server-side resources used by Simple Pictures Slider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1544.67 ▲4.44
Dashboard /wp-admin3.90 ▲0.5648.51 ▼13.90
Posts /wp-admin/edit.php4.01 ▲0.6651.76 ▲4.64
Add New Post /wp-admin/post-new.php6.48 ▲0.6092.74 ▼1.47
Media Library /wp-admin/upload.php3.82 ▲0.5937.04 ▲1.16
Add New /wp-admin/post-new.php?post_type=sps_slider3.8947.78
All Sliders /wp-admin/edit.php?post_type=sps_slider3.8640.00

Server storage [IO: ▲0.26MB] [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_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Simple Pictures Slider: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7214.05 ▲0.171.51 ▼0.1741.23 ▼1.10
Dashboard /wp-admin2,219 ▲395.62 ▲0.0981.79 ▼11.3038.49 ▼6.04
Posts /wp-admin/edit.php2,127 ▲272.02 ▲0.0244.96 ▲7.5537.45 ▲4.73
Add New Post /wp-admin/post-new.php1,549 ▲2023.07 ▼0.14601.37 ▼67.7349.00 ▼5.91
Media Library /wp-admin/upload.php1,421 ▲184.19 ▼0.0198.39 ▲1.2341.25 ▼0.02
Add New /wp-admin/post-new.php?post_type=sps_slider1,9404.10101.5952.88
All Sliders /wp-admin/edit.php?post_type=sps_slider1,2421.8933.7628.49

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/simple-pictures-slider/templates/navigation-dot.php
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/simple-pictures-slider/templates/navigation.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/simple-pictures-slider/templates/arrow.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/simple-pictures-slider/templates/arrows.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/simple-pictures-slider/templates/slider.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/simple-pictures-slider/templates/slide.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/simple-pictures-slider/templates/slider-empty.php:9

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% 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
Attributes that require attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt is a good inspiration

simple-pictures-slider/simple-pictures-slider.php Passed 13 tests

The primary PHP file in "Simple Pictures Slider" version 1.5 is used by WordPress to initiate all plugin functionality
32 characters long description:
Just a simple slider of pictures

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 detected3,400 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP114375601,637
CSS2178171,100
JavaScript386126342
PO File1133143320
SVG1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity139.67
▷ Minimum class complexity8.00
▷ Maximum class complexity341.00
Average method complexity5.92
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods76
▷ Static methods45.26%
▷ Public methods7497.37%
▷ Protected methods00.00%
▷ Private methods22.63%
Functions6
▷ Named functions233.33%
▷ Anonymous functions466.67%
Constants2
▷ Global constants2100.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
No PNG images were found in this plugin