83% image-text-slider-block

Code Review | Gutenberg slider block

WordPress plugin Gutenberg slider block scored83%from 54 tests.

About plugin

  • Plugin page: image-text-slider...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-5.8.0
  • WordPress version: 6.3.1
  • First release: Jan 4, 2022
  • Latest release: Apr 11, 2022
  • Number of updates: 4
  • Update frequency: every 26.0 days
  • Top authors: patelmohip (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /693 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▲3.55ms] Passed 4 tests

Analyzing server-side resources used by Gutenberg slider block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.99 ▲3.00
Dashboard /wp-admin3.33 ▲0.0353.90 ▼3.82
Posts /wp-admin/edit.php3.38 ▲0.0360.99 ▲3.72
Add New Post /wp-admin/post-new.php7.17 ▲1.28121.51 ▲13.90
Media Library /wp-admin/upload.php3.26 ▲0.0350.30 ▲11.31

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Gutenberg slider block: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲914.22 ▼0.042.84 ▲0.5642.52 ▼5.14
Dashboard /wp-admin2,195 ▲175.61 ▼0.1098.11 ▼13.4740.40 ▼4.93
Posts /wp-admin/edit.php2,103 ▲31.99 ▲0.0035.66 ▼3.3637.24 ▲1.16
Add New Post /wp-admin/post-new.php6,370 ▲4,83227.95 ▲4.841,090.02 ▲449.3943.36 ▼8.94
Media Library /wp-admin/upload.php1,400 ▼34.15 ▼0.04140.00 ▲26.6454.92 ▲6.30

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • 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
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 items
  • 1× 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/image-text-slider-block/slider-block.php:87

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (`/assets/screenshot-1.png`), #2 (`/assets/screenshot-2.png`), #3 (`/assets/screenshot-3.png`), #4 (`/assets/screenshot-4.png`), #5 (`/assets/screenshot-5.png`)
Please take inspiration from this readme.txt

image-text-slider-block/slider-block.php 92% from 13 tests

"Gutenberg slider block" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("image-text-slider-block.php" instead of "slider-block.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected43,862 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JSON30043,023
JavaScript46793583
PHP21012169
CSS351241
Markdown19029
Sass10017

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
5 PNG files occupy 3.27MB with 1.90MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/Screenshot-1.png728.02KB288.95KB▼ 60.31%
assets/Screenshot-5.png591.33KB216.71KB▼ 63.35%
assets/Screenshot-3.png390.20KB209.87KB▼ 46.21%
assets/Screenshot-2.png997.22KB411.60KB▼ 58.72%
assets/Screenshot-4.png643.19KB245.23KB▼ 61.87%