78% pars-slider

Code Review | Pars Slider

WordPress plugin Pars Slider scored78%from 54 tests.

About plugin

  • Plugin page: pars-slider
  • Plugin version: 0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.2
  • WordPress version: 6.3.1
  • First release: Mar 25, 2014
  • Latest release: Jun 15, 2015
  • Number of updates: 39
  • Update frequency: every 11.5 days
  • Top authors: m.dehqany (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,414 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.65MB] [CPU: ▼17.69ms] Passed 4 tests

An overview of server-side resources used by Pars Slider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0548.14 ▲4.67
Dashboard /wp-admin3.35 ▲0.0550.10 ▼1.87
Posts /wp-admin/edit.php3.40 ▲0.0549.41 ▼5.88
Add New Post /wp-admin/post-new.php3.14 ▼2.7536.95 ▼59.79
Media Library /wp-admin/upload.php3.28 ▲0.0536.72 ▼3.20
ParsSlider /wp-admin/edit.php?post_type=parsslider3.3243.28
Add New /wp-admin/post-new.php?post_type=parsslider3.1434.54
پارس اسلایدر /wp-admin/options-general.php?page=front-page-elements3.2432.90

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-comments
parsslider_height
widget_theysaidso_widget
widget_recent-posts
parsslider_direction
parsslider_width
theysaidso_admin_options
can_compress_scripts
parsslider_limit
db_upgraded

Browser metrics Passed 4 tests

Pars Slider: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲9814.25 ▼0.192.74 ▲1.0447.71 ▲3.66
Dashboard /wp-admin2,226 ▲525.51 ▼0.1684.78 ▼11.6042.26 ▼0.51
Posts /wp-admin/edit.php2,131 ▲311.96 ▼0.0036.68 ▼5.8336.88 ▼0.91
Add New Post /wp-admin/post-new.php1,552 ▲2623.48 ▲0.12665.68 ▼44.3755.76 ▼10.11
Media Library /wp-admin/upload.php1,431 ▲314.17 ▲0.00105.87 ▲5.8951.12 ▲4.62
ParsSlider /wp-admin/edit.php?post_type=parsslider1,1011.9936.3035.20
Add New /wp-admin/post-new.php?post_type=parsslider1,4982.3652.2674.33
پارس اسلایدر /wp-admin/options-general.php?page=front-page-elements8321.9926.5638.03

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 10 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • parsslider_direction
    • widget_recent-comments
    • can_compress_scripts
    • parsslider_height
    • parsslider_width
    • parsslider_limit

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
    • > GET request to /wp-admin/post-new.php?post_type=parsslider
    • > Notice in wp-content/plugins/pars-slider/pars-slider.php+53
    Undefined index: thumb
    • > GET request to /wp-admin/post-new.php?post_type=parsslider
    • > Notice in wp-content/plugins/pars-slider/pars-slider.php+54
    Undefined index: pic
    • > GET request to /wp-admin/post-new.php?post_type=parsslider
    • > Notice in wp-content/plugins/pars-slider/pars-slider.php+55
    Undefined index: url
    • > GET request to /wp-admin/post-new.php?post_type=parsslider
    • > Notice in wp-content/plugins/pars-slider/pars-slider.php+56
    Undefined index: title1
    • > GET request to /wp-admin/post-new.php?post_type=parsslider
    • > Notice in wp-content/plugins/pars-slider/pars-slider.php+57
    Undefined index: title2

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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/pars-slider/pars-slider.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === pars-slider === )
Please take inspiration from this readme.txt

pars-slider/pars-slider.php Passed 13 tests

"Pars Slider" version 0.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
66 characters long description:
by this plugin you can make a Jquery Slider , Simple easy and fast

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
Everything looks great! No dangerous files found in this plugin212 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1310132
CSS10079
JavaScript1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin