99% clove-image-slider

Code Review | Clove Image Slider

WordPress plugin Clove Image Slider scored 99% from 54 tests.

About plugin

  • Plugin page: clove-image-slider
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 5.9.2
  • First release: Jun 25, 2021
  • Latest release: Mar 5, 2022
  • Number of updates: 5
  • Update frequency: every 50.6 days
  • Top authors: codeclove (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 166 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.13MB] [CPU: ▼296.75ms] Passed 4 tests

Server-side resources used by Clove Image Slider
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.0857.86 ▼17.19
Dashboard /wp-admin3.59 ▲0.1888.84 ▲54.46
Posts /wp-admin/edit.php3.81 ▲0.1739.57 ▲2.59
Add New Post /wp-admin/post-new.php7.05 ▲0.0993.98 ▼1,175.03
Media Library /wp-admin/upload.php3.46 ▲0.1731.57 ▲2.64
Add New Image Slider /wp-admin/post-new.php?post_type=ccis_slider4.4250.17
All Image Sliders /wp-admin/edit.php?post_type=ccis_slider3.5627.91

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 46 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Clove Image Slider: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,819 ▲6515.63 ▲0.376.08 ▲0.033.55 ▲1.06
Dashboard /wp-admin2,912 ▲596.09 ▼0.03124.50 ▼23.74163.76 ▼7.50
Posts /wp-admin/edit.php2,722 ▲343.23 ▲0.0067.58 ▲4.13193.01 ▲51.36
Add New Post /wp-admin/post-new.php1,804 ▲14317.14 ▲0.66465.83 ▲32.71166.74 ▲4.33
Media Library /wp-admin/upload.php1,726 ▲255.53 ▲0.06140.45 ▼27.60196.30 ▼2.50
Add New Image Slider /wp-admin/post-new.php?post_type=ccis_slider13,93612.64322.04278.59
All Image Sliders /wp-admin/edit.php?post_type=ccis_slider1,4313.1661.44120.44

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests Passed 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 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
3 plugin tags: slider, image slider, fancybox

clove-image-slider/clove-image-slider.php 92% from 13 tests

The entry point to "Clove Image Slider" version 1.0.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin13,365 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript91,0111,0467,935
PHP19468304,371
CSS1071501,050
SVG1019

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 169)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity32.17
▷ Minimum class complexity1.00
▷ Maximum class complexity174.00
Average method complexity10.35
▷ Minimum method complexity1.00
▷ Maximum method complexity169.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes116.67%
Methods20
▷ Static methods1890.00%
▷ Public methods1890.00%
▷ Protected methods00.00%
▷ Private methods210.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/up.png6.22KB1.05KB▼ 83.16%