83% crisp-slider

Code Review | Crisp Slider

WordPress plugin Crisp Slider scored83%from 54 tests.

About plugin

  • Plugin page: crisp-slider
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.1
  • WordPress version: 6.3.1
  • First release: Aug 26, 2017
  • Latest release: Aug 26, 2017
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: wppatrickk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /837 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
This plugin's installer ran successfully

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

Analyzing server-side resources used by Crisp Slider
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2446.77 ▲6.23
Dashboard /wp-admin3.53 ▲0.1951.04 ▼11.69
Posts /wp-admin/edit.php3.64 ▲0.2957.71 ▲7.44
Add New Post /wp-admin/post-new.php6.11 ▲0.2389.53 ▼11.39
Media Library /wp-admin/upload.php3.45 ▲0.2240.24 ▲0.79
Sliders /wp-admin/edit.php?post_type=crisp_slider3.5345.93
Add New /wp-admin/post-new.php?post_type=crisp_slider3.5150.80

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 28 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_dx_sample_widget
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Crisp Slider
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲14313.46 ▼0.939.42 ▲7.7043.74 ▲0.97
Dashboard /wp-admin2,222 ▲455.62 ▼0.0685.96 ▼12.2838.67 ▼0.59
Posts /wp-admin/edit.php2,130 ▲301.96 ▼0.0739.65 ▼3.5734.76 ▼2.26
Add New Post /wp-admin/post-new.php1,549 ▲2323.59 ▲0.50684.09 ▲29.4955.45 ▲1.08
Media Library /wp-admin/upload.php1,427 ▲244.19 ▼0.0395.03 ▼10.9244.04 ▼0.22
Sliders /wp-admin/edit.php?post_type=crisp_slider1,2683.6265.3331.72
Add New /wp-admin/post-new.php?post_type=crisp_slider2,9064.96101.0291.71

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_dx_sample_widget
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/crisp-slider/inc/gallery.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/crisp-slider/inc/crisp-slider-widget.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/crisp-slider/inc/crisp-slider-metabox.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/crisp-slider/crispslider.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/crisp-slider/inc/crisp-slider-shortcode.php:504

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 27 tag instead of maximum 10
The official readme.txt might help

crisp-slider/crispslider.php 85% from 13 tests

This is the main PHP file of "Crisp Slider" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("crisp-slider.php" instead of "crispslider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin2,790 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP52231601,324
JavaScript4110478975
CSS47024327
PO File14954109
Markdown112031
SVG30024

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.27
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/plugin-banner.png5.64KB2.07KB▼ 63.34%
css/images/theme-banner.png5.53KB1.94KB▼ 64.88%
css/images/plugin-support.png3.37KB1.14KB▼ 66.04%