83% wp-slide-categorywise

Code Review | Wp Slide Categorywise

WordPress plugin Wp Slide Categorywise scored83%from 54 tests.

About plugin

  • Plugin page: wp-slide-category...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.1
  • WordPress version: 6.3.1
  • First release: Feb 16, 2016
  • Latest release: May 9, 2023
  • Number of updates: 24
  • Update frequency: every 110.0 days
  • Top authors: neelam.samariya (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /3,619 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.22MB] [CPU: ▼7.05ms] Passed 4 tests

This is a short check of server-side resources used by Wp Slide Categorywise
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2237.27 ▼3.20
Dashboard /wp-admin3.53 ▲0.2247.83 ▼3.06
Posts /wp-admin/edit.php3.64 ▲0.2850.57 ▲0.57
Add New Post /wp-admin/post-new.php6.11 ▲0.2281.67 ▼22.49
Media Library /wp-admin/upload.php3.45 ▲0.2238.73 ▲3.14
Wp Slide Categorywise /wp-admin/admin.php?page=wp_slide_categorywise3.5233.38
Add Slider /wp-admin/admin.php?page=add_slider3.4735.63
Manage Slider /wp-admin/admin.php?page=wpcs_manage_slider3.4234.32

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 24 new files
Database: 2 new tables, 7 new options
New tables
wp_category_slider
wp_cs_settings
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
cs_db_version
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Wp Slide Categorywise: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,950 ▲17914.18 ▼0.115.27 ▲3.4039.56 ▼2.24
Dashboard /wp-admin2,245 ▲604.89 ▼1.03107.18 ▲3.6139.29 ▼4.41
Posts /wp-admin/edit.php2,128 ▲392.05 ▲0.0239.35 ▼1.6433.72 ▼2.38
Add New Post /wp-admin/post-new.php1,558 ▲2523.25 ▲0.14589.76 ▼19.6352.98 ▲7.49
Media Library /wp-admin/upload.php1,418 ▲304.29 ▲0.1395.55 ▼5.8340.26 ▼1.95
Wp Slide Categorywise /wp-admin/admin.php?page=wp_slide_categorywise1,2511.7624.8840.57
Add Slider /wp-admin/admin.php?page=add_slider9661.7924.0534.14
Manage Slider /wp-admin/admin.php?page=wpcs_manage_slider8441.8924.6924.99

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • cs_db_version
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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 fix the following
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/wp-slide-categorywise/add_slider.php:19
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/wp-slide-categorywise/class.tabular.php on line 9
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-slide-categorywise/add_slider.php on line 9
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-slide-categorywise/class.tabular.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-slide-categorywise/wp-slide-categorywise.php:11
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-slide-categorywise/class.tabular.php on line 9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (Add slides form.), #2 (Manage slides listing category wise.), #3 (Slider settings form display in admin panel.), #4 (Frontend slider display categorywise.), #5 (Responsive slider Image 1.), #6 (Responsive slider Image 2.)
The official readme.txt might help

wp-slide-categorywise/wp-slide-categorywise.php 92% from 13 tests

The principal PHP file in "Wp Slide Categorywise" v. 1.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 146 characters long)

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
Everything looks great! No dangerous files found in this plugin6,884 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
CSS4991334,681
PHP62513521,577
JavaScript46119626

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity46.00
▷ Minimum class complexity5.00
▷ Maximum class complexity87.00
Average method complexity4.46
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods2492.31%
▷ Protected methods13.85%
▷ Private methods13.85%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 1.38MB with 0.89MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png289.89KB73.55KB▼ 74.63%
screenshot-4.png716.33KB158.68KB▼ 77.85%
images/controls.png2.74KB1.42KB▼ 48.29%
screenshot-1.png177.45KB51.96KB▼ 70.72%
screenshot-3.png106.14KB51.75KB▼ 51.24%