73% comslider-slideshow

Code Review | comSlider Slideshow

WordPress plugin comSlider Slideshow scored73%from 54 tests.

About plugin

  • Plugin page: comslider-slideshow
  • Plugin version: 1.0.11
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3
  • WordPress version: 6.3.1
  • First release: Jul 6, 2019
  • Latest release: Nov 27, 2019
  • Number of updates: 10
  • Update frequency: every 14.4 days
  • Top authors: vilig (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /832 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼2.20MB] [CPU: ▼59.92ms] Passed 4 tests

This is a short check of server-side resources used by comSlider Slideshow
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.664.57 ▼42.85
Dashboard /wp-admin2.09 ▼1.485.87 ▼48.64
Posts /wp-admin/edit.php2.09 ▼1.597.42 ▼52.98
Add New Post /wp-admin/post-new.php2.09 ▼4.066.75 ▼95.21
Media Library /wp-admin/upload.php2.09 ▼1.404.60 ▼31.06

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_comslider
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for comSlider Slideshow
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲6614.31 ▲0.141.89 ▼0.1340.86 ▼1.20
Dashboard /wp-admin2,209 ▲325.67 ▲0.0192.19 ▼0.0074.12 ▲31.09
Posts /wp-admin/edit.php2,129 ▲262.02 ▲0.0039.18 ▼2.3534.03 ▼0.54
Add New Post /wp-admin/post-new.php6,222 ▲4,68919.05 ▼3.92864.13 ▲241.2237.08 ▼14.32
Media Library /wp-admin/upload.php1,423 ▲264.15 ▼0.05121.91 ▲17.7954.80 ▲9.32

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the cms-block-script handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_comslider

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/comslider-slideshow/includes/cms-settings.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/comslider-slideshow/comslider.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #5 (Statistic of views is recorded for your slideshows) image not found
The official readme.txt might help

comslider-slideshow/comslider.php 85% from 13 tests

"comSlider Slideshow" version 1.0.11's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("comslider-slideshow.php" instead of "comslider.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 351 characters long)

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
Success! There were no dangerous files found in this plugin994 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript12623637
CSS3149281
PHP3223976

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.10
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity2.00
▷ Minimum method complexity2.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/logo.png0.47KB0.36KB▼ 23.66%
includes/ar.png0.43KB0.29KB▼ 33.56%
includes/logo_txt.png2.47KB1.73KB▼ 30.08%