90% mg-block-slider

Code Review | MG Block Slider

WordPress plugin MG Block Slider scored90%from 54 tests.

About plugin

  • Plugin page: mg-block-slider
  • Plugin version: 1.3.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.1
  • WordPress version: 6.3.1
  • First release: Oct 22, 2022
  • Latest release: Dec 26, 2022
  • Number of updates: 17
  • Update frequency: every 3.8 days
  • Top authors: gigenam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /661 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼2.75ms] Passed 4 tests

Analyzing server-side resources used by MG Block Slider
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0942.63 ▲2.02
Dashboard /wp-admin3.38 ▲0.0850.84 ▼0.84
Posts /wp-admin/edit.php3.44 ▲0.0847.56 ▼3.81
Add New Post /wp-admin/post-new.php5.97 ▲0.0988.30 ▼8.35
Media Library /wp-admin/upload.php3.31 ▲0.0841.56 ▲2.81

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

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

Browser metrics Passed 4 tests

MG Block Slider: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲7314.29 ▲0.062.00 ▲0.3445.57 ▲1.11
Dashboard /wp-admin2,198 ▲245.62 ▲0.0695.56 ▲5.4342.47 ▼0.21
Posts /wp-admin/edit.php2,097 ▼02.02 ▲0.0236.92 ▲1.4932.10 ▼2.80
Add New Post /wp-admin/post-new.php6,368 ▲4,84227.84 ▲4.20906.57 ▲181.8841.00 ▼22.11
Media Library /wp-admin/upload.php1,400 ▲34.21 ▼0.0099.43 ▼34.4147.02 ▼8.08

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 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
7 plugin tags: content, editor, video, slider, block...

mg-block-slider/mg-block-slider.php Passed 13 tests

Analyzing the main PHP file in "MG Block Slider" version 1.3.1
140 characters long description:
A simple slideshow block to use it in any block editor with any type of content. Post, pages, widgets. Anything and anywhere where you want.

Code Analysis Passed 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
There were no executable files found in this plugin2,331 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
CSS416111910
JavaScript443112637
JSON500432
PO File197129175
PHP42598169
SVG8008

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods10100.00%
▷ Public methods990.00%
▷ Protected methods00.00%
▷ Private methods110.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.04MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/banner.png39.02KB39.98KB0.00%