10% pslider

Code Review | WP PSlider

WordPress plugin WP PSlider scored 10% from 54 tests.

About plugin

  • Plugin page: pslider
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: May 9, 2015
  • Latest release: Aug 5, 2015
  • Number of updates: 25
  • Update frequency: every 3.5 days
  • Top authors: charly23 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 612 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/pslider/lib/PL_BaseLoad.php+70
    Only variables should be passed by reference

Server metrics [RAM: ▼1.96MB] [CPU: ▼52.99ms] Passed 4 tests

Analyzing server-side resources used by WP PSlider
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.434.91 ▼40.27
Dashboard /wp-admin2.05 ▼1.265.83 ▼42.15
Posts /wp-admin/edit.php2.05 ▼1.316.38 ▼40.34
Add New Post /wp-admin/post-new.php2.05 ▼3.845.42 ▼89.19
Media Library /wp-admin/upload.php2.05 ▼1.185.14 ▼28.01
Add New Group /wp-admin/admin.php?page=add_new_group_slide2.055.63
Option /wp-admin/admin.php?page=option2.055.88
PSlider /wp-admin/admin.php?page=p_slider2.057.65
Add New Photos /wp-admin/admin.php?page=add_new_photos2.055.31
Manage Photos /wp-admin/admin.php?page=manage_slides2.056.18

Server storage [IO: ▲0.95MB] [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: 105 new files
Database: 2 new tables, 6 new options
New tables
wp_pslider_group
wp_pslider
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for WP PSlider
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,148 ▲41316.22 ▲1.5812.24 ▲10.0648.58 ▲2.52
Dashboard /wp-admin2,369 ▲1816.59 ▲1.68131.11 ▲28.6189.07 ▲42.93
Posts /wp-admin/edit.php2,298 ▲2063.53 ▲1.5356.50 ▲20.8372.80 ▲41.58
Add New Post /wp-admin/post-new.php1,562 ▲2718.29 ▼4.78655.96 ▼10.1641.11 ▼16.61
Media Library /wp-admin/upload.php1,434 ▲464.29 ▲0.1782.16 ▼23.9585.01 ▲40.67
Add New Group /wp-admin/admin.php?page=add_new_group_slide1,4303.2043.0966.56
Option /wp-admin/admin.php?page=option1,0153.2341.8564.52
PSlider /wp-admin/admin.php?page=p_slider1,0013.1847.1278.67
Add New Photos /wp-admin/admin.php?page=add_new_photos1,0713.2040.1570.34
Manage Photos /wp-admin/admin.php?page=manage_slides1,0093.2040.5766.58

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/pslider/lib/PL_BaseLoad.php+70
    Only variables should be passed by reference
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_pslider_group
    • wp_pslider
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 20 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=manage_slides
    • > Notice in wp-content/plugins/pslider/lib/PL_BaseLoad.php+17
    Only variables should be passed by reference
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=manage_slides
    • > 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 jQuery handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=manage_slides
    • > 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 jquery-ui-sortable handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=manage_slides
    • > 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 jquery-ui-draggable handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=manage_slides
    • > 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 jquery-ui-droppable handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=manage_slides
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style 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 admin-style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=manage_slides
    • > 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 admin-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=manage_slides
    • > 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 ajax_handler handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=manage_slides
    • > Deprecated in wp-content/plugins/pslider/pslider-load.php+32
    Non-static method PL_BaseAdd::localize_script() should not be called statically
    • > GET request to /wp-admin/admin.php?page=add_new_group_slide
    • > Deprecated in wp-content/plugins/pslider/views/add-new-group.php+345
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/pslider/views/shortcode.php
    • > /wp-content/plugins/pslider/views/shortcode-copy.php
  • 11× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PL_BaseHTML' not found in wp-content/plugins/pslider/views/settings.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'PL_BaseHTML' not found in wp-content/plugins/pslider/views/pslider.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/pslider/lib/PL_BaseLoad.php:76
    • > PHP Fatal error
      Uncaught Error: Class 'PL_BaseInput' not found in wp-content/plugins/pslider/views/add-new-photos.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PL_BaseHTML' not found in wp-content/plugins/pslider/views/option.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'PL_Bootstrap' not found in wp-content/plugins/pslider/pslider-load.php:3
    • > PHP Notice
      Only variables should be passed by reference in wp-content/plugins/pslider/lib/PL_BaseLoad.php on line 70
    • > PHP Fatal error
      Uncaught Error: Class 'PL_BaseInput' not found in wp-content/plugins/pslider/views/add-new-group.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PL_BaseHTML' not found in wp-content/plugins/pslider/views/manage-slides.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'PL_BaseHTML' not found in wp-content/plugins/pslider/views/documentation.php:1

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=manage_slides
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/pslider/js/admin-script.js?ver=6.3.1:68:42)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=manage_slides
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === pslider === )
  • Screenshots: These screenshots require images: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is taken from), #2 (This is the second screen shot)
Please take inspiration from this readme.txt

pslider/pslider.php Passed 13 tests

Analyzing the main PHP file in "WP PSlider" version 1.0.0
82 characters long description:
This particular plugin has the ability to group, manage and upload mulitple image.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected8,571 lines of code in 58 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript236268743,688
PHP251,5112483,492
CSS92031531,313
Markdown135078

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity36.75
▷ Minimum class complexity1.00
▷ Maximum class complexity104.00
Average method complexity4.61
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods119
▷ Static methods7764.71%
▷ Public methods119100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
35 PNG files occupy 0.35MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/1390896087_page_white_edit.png0.60KB0.60KB0.00%
images/1390816354_slides.png0.54KB0.68KB0.00%
images/sprite-plugin.png1.97KB1.01KB▼ 48.88%
images/flexs/nav_style2_arrows-prev.png1.30KB0.35KB▼ 72.80%
styles/rewind.png56.61KB1.55KB▼ 97.27%