10% simple-slider

Code Review | Simple Slider

WordPress plugin Simple Slider scored10%from 54 tests.

About plugin

  • Plugin page: simple-slider
  • Plugin version: 1.2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.2
  • WordPress version: 6.3.1
  • First release: Nov 13, 2012
  • Latest release: Jul 13, 2013
  • Number of updates: 27
  • Update frequency: every 9.2 days
  • Top authors: ChrisHurst (92.59%)MyWebsiteAdvisor (11.11%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /13,114 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/simple-slider/plugin-loader.php+18
    Undefined index: action

Server metrics [RAM: ▼0.84MB] [CPU: ▼35.62ms] Passed 4 tests

A check of server-side resources used by Simple Slider
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1242.52 ▼0.95
Dashboard /wp-admin3.10 ▼0.2124.46 ▼26.21
Posts /wp-admin/edit.php3.10 ▼0.2623.73 ▼29.42
Add New Post /wp-admin/post-new.php3.10 ▼2.7924.98 ▼75.51
Media Library /wp-admin/upload.php3.10 ▼0.1324.78 ▼11.35
Simple Slider /wp-admin/options-general.php?page=simple-slider/plugin-admin.php3.1026.88

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Slider
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲11113.91 ▼0.4713.10 ▲11.0038.05 ▼10.36
Dashboard /wp-admin2,196 ▲195.54 ▼0.0790.26 ▼1.3740.77 ▼4.98
Posts /wp-admin/edit.php2,107 ▲72.03 ▲0.0338.47 ▲1.3734.42 ▼3.52
Add New Post /wp-admin/post-new.php1,558 ▲3218.38 ▲0.72620.41 ▼74.5662.13 ▲4.89
Media Library /wp-admin/upload.php1,407 ▲74.25 ▲0.0396.01 ▼16.0543.94 ▼6.72
Simple Slider /wp-admin/options-general.php?page=simple-slider/plugin-admin.php1,4914.84127.9740.03

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
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple-slider/plugin-admin.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=simple-slider/plugin-admin.php
    • > User deprecated in wp-includes/functions.php+5828
    Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.

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
Please fix the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Simple_Slider' not found in wp-content/plugins/simple-slider/plugin-admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/simple-slider/plugin-loader.php:11

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 issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #1 (Admin Page)
The official readme.txt might help

simple-slider/plugin-loader.php 92% from 13 tests

The main file in "Simple Slider" v. 1.2.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
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 ("simple-slider.php" instead of "plugin-loader.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
Success! There were no dangerous files found in this plugin2,007 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript121273351,446
PHP3328107561

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity29.00
▷ Minimum class complexity8.00
▷ Maximum class complexity50.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1381.25%
▷ Protected methods16.25%
▷ Private methods212.50%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/right.png0.39KB0.22KB▼ 45.05%
images/left.png0.38KB0.22KB▼ 41.71%
images/pixel.png0.15KB0.12KB▼ 21.02%