84% category-posts-slider-pro

Code Review | Category Posts Slider Pro

WordPress plugin Category Posts Slider Pro scored84%from 54 tests.

About plugin

  • Plugin page: category-posts-sl...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.1
  • WordPress version: 6.3.1
  • First release: Jul 18, 2016
  • Latest release: May 9, 2023
  • Number of updates: 21
  • Update frequency: every 118.4 days
  • Top authors: neelam.samariya (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /8,941 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.69ms] Passed 4 tests

Analyzing server-side resources used by Category Posts Slider Pro
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.15 ▲0.26
Dashboard /wp-admin3.33 ▼0.0143.12 ▼17.63
Posts /wp-admin/edit.php3.38 ▲0.0346.81 ▼1.15
Add New Post /wp-admin/post-new.php5.91 ▲0.0377.50 ▼12.25
Media Library /wp-admin/upload.php3.25 ▲0.0336.70 ▲0.46
Plugin Settings /wp-admin/admin.php?page=category_posts_slider_pro3.5929.85
Add New /wp-admin/admin.php?page=category_posts_slider_pro-new3.2833.06

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 30 new files
Database: 1 new table, 8 new options
New tables
wp_cpsp_slides
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
category_posts_slider_pro_options
db_upgraded
cpsp_db_version
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Category Posts Slider Pro: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,943 ▲17213.69 ▼0.9710.51 ▲8.5938.01 ▼9.11
Dashboard /wp-admin2,229 ▲415.82 ▲0.9499.22 ▼18.5374.20 ▲31.60
Posts /wp-admin/edit.php2,118 ▲292.02 ▼0.0937.66 ▲0.4130.93 ▼1.22
Add New Post /wp-admin/post-new.php1,699 ▲18524.43 ▲6.96694.17 ▲15.6648.47 ▼7.96
Media Library /wp-admin/upload.php1,414 ▲264.13 ▼0.1693.80 ▼20.1179.73 ▲32.16
Plugin Settings /wp-admin/admin.php?page=category_posts_slider_pro2,0193.1266.4044.51
Add New /wp-admin/admin.php?page=category_posts_slider_pro-new9562.0932.8640.81

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=category_posts_slider_pro-new
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/category-posts-slider-pro/js/category_posts_js.js?ver=1.0.0:10:20)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&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&ver=6.3.1:2:27292)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=category_posts_slider_pro-new
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

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
These attributes need your attention:
  • Tags: There are too many tags (15 tag instead of maximum 10)
The official readme.txt might help

category-posts-slider-pro/category-posts-slider-pro.php Passed 13 tests

The primary PHP file in "Category Posts Slider Pro" version 1.1 is used by WordPress to initiate all plugin functionality
74 characters long description:
Fully Responsive and Mobile Friendly way to display category posts slider.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin8,999 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS3996225,210
JavaScript571522,566
PHP41481541,223

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
12 PNG files occupy 5.41MB with 3.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png641.60KB129.43KB▼ 79.83%
screenshot-2.png129.57KB48.04KB▼ 62.93%
screenshot-7.png1,049.96KB209.92KB▼ 80.01%
screenshot-4.png1,154.92KB238.56KB▼ 79.34%
images/slideshow_icon.png1.37KB1.40KB0.00%