10% pro-slider

Code Review | Proslider

WordPress plugin Proslider scored 10% from 54 tests.

About plugin

  • Plugin page: pro-slider
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8
  • WordPress version: 5.8.1
  • First release: Sep 2, 2021
  • Latest release: Sep 2, 2021
  • Number of updates: 3
  • Update frequency: every 2.0 days
  • Top authors: teamdream (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 68 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/pro-slider/proslider.php+52
    Undefined variable: charset_collate

Server metrics [RAM: ▼0.14MB] [CPU: ▼150.99ms] Passed 4 tests

A check of server-side resources used by Proslider
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.77 ▲0.0523.77 ▲5.09
Dashboard /wp-admin3.00 ▼0.0538.57 ▼9.57
Posts /wp-admin/edit.php3.06 ▼0.0436.46 ▼11.78
Add New Post /wp-admin/post-new.php5.01 ▼0.4280.67 ▼581.38
Media Library /wp-admin/upload.php2.97 ▼0.0336.37 ▼1.22
Proslider /wp-admin/admin.php?page=proslider2.9931.11
My Sliders /wp-admin/admin.php?page=my-sliders2.8720.89
Get Premium /wp-admin/admin.php?page=get-premium2.8722.97

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 15 new files
Database: 1 new table, no new options
New tables
wp_proslider

Browser metrics Passed 4 tests

Proslider: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,057 ▲46117.71 ▲1.7410.85 ▲2.3751.93 ▼0.39
Dashboard /wp-admin3,213 ▲2798.01 ▲2.03159.37 ▲11.05111.41 ▼8.50
Posts /wp-admin/edit.php3,011 ▲2724.21 ▲1.5383.41 ▲19.33102.51 ▲8.42
Add New Post /wp-admin/post-new.php1,649 ▲14921.04 ▲2.28269.77 ▼114.11124.80 ▲13.47
Media Library /wp-admin/upload.php1,860 ▲534.85 ▼0.17134.27 ▼28.10130.95 ▼4.08
Proslider /wp-admin/admin.php?page=proslider1,4674.08103.4969.59
My Sliders /wp-admin/admin.php?page=my-sliders1,4753.9981.0990.52
Get Premium /wp-admin/admin.php?page=get-premium1,4773.8081.11162.69

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=get-premium
    • > User notice in wp-includes/functions.php+5663
    WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)
  • 19 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=get-premium
    • > Notice in wp-admin/menu-header.php+91
    Undefined offset: 2
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=get-premium
    • > Notice in wp-admin/menu-header.php+141
    Undefined offset: 0
    • > GET request to /wp-admin/admin.php?page=my-sliders
    • > Notice in wp-content/plugins/pro-slider/proview/allsliders.php+74
    Undefined variable: id

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
Please take a closer look at the following
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/pro-slider/proview/mainProSlider.php
    • > /wp-content/plugins/pro-slider/proview/Premium_virsion.php
    • > /wp-content/plugins/pro-slider/proview/allsliders.php
    • > /wp-content/plugins/pro-slider/proview/mainProSliderFront.php
    • > /wp-content/plugins/pro-slider/proslider.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant PROSLIDER_PLUGIN_DIR_PATH - assumed 'PROSLIDER_PLUGIN_DIR_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/pro-slider/proview/Premium_virsion.php on line 1
    • > PHP Warning
      Use of undefined constant PROSLIDER_PLUGIN_DIR_PATH - assumed 'PROSLIDER_PLUGIN_DIR_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/pro-slider/proview/Premium_virsion.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots do not have images: #1 (This is the screenshot of (Screenshot-1.png).), #2 (This is the screenshot of ( Screenshot-2.png).), #3 (This is the screenshot of (Screenshot-3.png).), #4 (This is the screenshot of (Screenshot-4.png).), #5 (This is the screenshot of (Screenshot-5.png).), #6 (This is the screenshot of (Screenshot-6.png).)
  • Contributors: Plugin contributors field is missing
Please take inspiration from this readme.txt

pro-slider/proslider.php 77% from 13 tests

"Proslider" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Requires at least: Required version must match the one declared in readme.txt ("5.6" instead of "5.2")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("pro-slider.php" instead of "proslider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,736 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS36512811
PHP512029488
JavaScript49114437

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions1184.62%
▷ Anonymous functions215.38%
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
1 PNG file occupies 0.15MB with 0.09MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/proimages/circle-img.png153.49KB62.06KB▼ 59.57%