89% magic-slider

Code Review | Magic Slider

WordPress plugin Magic Slider scored89%from 54 tests.

About plugin

  • Plugin page: magic-slider
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 6.3.1
  • First release: Sep 9, 2015
  • Latest release: Sep 5, 2020
  • Number of updates: 12
  • Update frequency: every 151.9 days
  • Top authors: webvitaly (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,661 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 successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Magic Slider
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.74 ▼1.04
Dashboard /wp-admin3.35 ▲0.0448.85 ▼2.07
Posts /wp-admin/edit.php3.40 ▲0.0449.23 ▼2.57
Add New Post /wp-admin/post-new.php5.93 ▲0.0490.03 ▼8.26
Media Library /wp-admin/upload.php3.27 ▲0.0437.51 ▼1.30
Settings /wp-admin/edit.php?post_type=magic_slide&page=settings3.2434.33
Slide categories /wp-admin/edit-tags.php?taxonomy=magic_slide_category&post_type=magic_slide3.3637.79
Add Slide /wp-admin/post-new.php?post_type=magic_slide3.3950.67
All Slides /wp-admin/edit.php?post_type=magic_slide3.3138.14

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 25 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments
magic_slider_settings
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Magic Slider
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲14913.89 ▼0.528.87 ▲7.2443.59 ▲1.75
Dashboard /wp-admin2,233 ▲535.65 ▼0.0296.79 ▼0.3841.87 ▲3.29
Posts /wp-admin/edit.php2,135 ▲322.03 ▼0.0134.22 ▼5.9835.81 ▲2.63
Add New Post /wp-admin/post-new.php1,555 ▲1923.54 ▲5.03652.80 ▲4.4555.73 ▼9.55
Media Library /wp-admin/upload.php1,438 ▲384.18 ▼0.0496.67 ▼12.7241.28 ▼5.58
Settings /wp-admin/edit.php?post_type=magic_slide&page=settings9262.0030.2129.25
Slide categories /wp-admin/edit-tags.php?taxonomy=magic_slide_category&post_type=magic_slide1,3092.1226.9829.60
Add Slide /wp-admin/post-new.php?post_type=magic_slide2,3457.71168.4762.22
All Slides /wp-admin/edit.php?post_type=magic_slide1,1081.9730.8831.24

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • magic_slider_settings
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

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

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
  • Screenshots: These screenshots require images: #1 (Magic Slider preview.), #2 (Adding Magic Slider shortcode to the page or post content.), #3 (Magic Slider Settings.)
Please take inspiration from this readme.txt

magic-slider/magic-slider.php Passed 13 tests

This is the main PHP file of "Magic Slider" version 1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
31 characters long description:
Responsive and flexible slider.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected2,210 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript484559995
Markdown1950483
PHP412936400
CSS27038307
JSON10025

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity1.33
▷ Minimum class complexity1.00
▷ Maximum class complexity2.00
Average method complexity1.11
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods9
▷ Static methods9100.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.58MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png59.90KB26.80KB▼ 55.27%
img/arrow-prev.png1.85KB1.01KB▼ 45.40%
screenshot-2.png69.83KB31.41KB▼ 55.03%
img/controls.png2.74KB1.42KB▼ 48.29%
img/arrow-next.png1.83KB1.22KB▼ 33.26%