78% subitem-al-slider

Code Review | Subitem AL Slider

WordPress plugin Subitem AL Slider scored 78% from 54 tests.

About plugin

  • Plugin page: subitem-al-slider
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.2.2
  • WordPress version: 6.3.1
  • First release: Jun 26, 2015
  • Latest release: Nov 4, 2015
  • Number of updates: 3
  • Update frequency: every 44.0 days
  • Top authors: alexdtn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,823 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
Install script ran successfully

Server metrics [RAM: ▲0.76MB] [CPU: ▲1.49ms] Passed 4 tests

This is a short check of server-side resources used by Subitem AL Slider
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3843.13 ▲5.17
Dashboard /wp-admin4.23 ▲0.9352.71 ▲2.31
Posts /wp-admin/edit.php4.28 ▲0.9347.51 ▲1.67
Add New Post /wp-admin/post-new.php6.75 ▲0.8788.07 ▼3.19
Media Library /wp-admin/upload.php4.09 ▲0.8640.03 ▲7.49
Slider Info /wp-admin/admin.php?page=sial_slider_show_info4.1339.80
Other Products /wp-admin/admin.php?page=sial_slider_show_products4.1039.05
Sub Item AL Slider /wp-admin/admin.php?page=sial_slider_show4.0736.47
Slide /wp-admin/admin.php?page=sial_slide4.0737.59

Server storage [IO: ▲1.45MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 176 new files
Database: 9 new tables, 8 new options
New tables
wp_sial_images
wp_sial_containers
wp_sial_items
wp_sial_groups
wp_sial_texts
wp_sial_main_info
wp_sial_moves
wp_sial_move_points
wp_sial_bg_images
New WordPress options
sial_al_slider_db_version
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_subitem_al_slider_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Subitem AL Slider
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲9913.26 ▼1.124.55 ▲2.8943.14 ▼0.71
Dashboard /wp-admin2,243 ▲545.84 ▲0.94100.60 ▼2.1166.70 ▲26.65
Posts /wp-admin/edit.php2,126 ▲372.01 ▲0.0033.13 ▼6.0431.40 ▼3.67
Add New Post /wp-admin/post-new.php1,551 ▲1823.06 ▼0.14665.42 ▲21.7057.38 ▼0.06
Media Library /wp-admin/upload.php1,422 ▲314.10 ▼0.1395.65 ▼9.6370.16 ▲25.13
Slider Info /wp-admin/admin.php?page=sial_slider_show_info1,8333.5961.4189.64
Other Products /wp-admin/admin.php?page=sial_slider_show_products1,0493.4847.4434.61
Sub Item AL Slider /wp-admin/admin.php?page=sial_slider_show1,5983.3143.9385.87
Slide /wp-admin/admin.php?page=sial_slide2,6453.3553.5168.56

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 8 options
    • sial_al_slider_db_version
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_subitem_al_slider_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sial_slide
    • > Warning in wp-content/plugins/subitem-al-slider/classes/controllers/item_texts.php+73
    count(): Parameter must be an array or an object that implements Countable
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sial_slide
    • > Warning in wp-content/plugins/subitem-al-slider/templates/slide_setup/tab2_block2.tpl+109
    Invalid argument supplied for foreach()

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
The following issues need your attention
  • 44× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/subitem-al-slider/classes/models/groups.php
    • > /wp-content/plugins/subitem-al-slider/classes/controllers/items.php
    • > /wp-content/plugins/subitem-al-slider/classes_front/models/main.php
    • > /wp-content/plugins/subitem-al-slider/inc/cachedb.class.php
    • > /wp-content/plugins/subitem-al-slider/users_subitem_al_slider.php
    • > /wp-content/plugins/subitem-al-slider/inc/helper.php
    • > /wp-content/plugins/subitem-al-slider/subitem-al-slider.php
    • > /wp-content/plugins/subitem-al-slider/classes/controllers/item_images.php
    • > /wp-content/plugins/subitem-al-slider/classes/models/impexp.php
    • > /wp-content/plugins/subitem-al-slider/inc/userscommon.class.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (145 tag instead of maximum 10)
You can look at the official readme.txt

subitem-al-slider/subitem-al-slider.php Passed 13 tests

The entry point to "Subitem AL Slider" version 1.0.0 is a PHP file that has certain tags in its header comment area
54 characters long description:
Slider with ability to make containers from sub items.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin8,919 lines of code in 69 files:
LanguageFilesBlank linesComment linesLines of code
PHP458246154,092
CSS172163293,600
JavaScript72061491,227

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity14.26
▷ Minimum class complexity1.00
▷ Maximum class complexity203.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes39
▷ Abstract classes00.00%
▷ Concrete classes39100.00%
▷ Final classes00.00%
Methods293
▷ Static methods93.07%
▷ Public methods24784.30%
▷ Protected methods4615.70%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants54
▷ Global constants00.00%
▷ Class constants54100.00%
▷ Public constants54100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
50 PNG files occupy 0.23MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/arrow_left_03.png3.15KB1.60KB▼ 49.32%
images/slide_empty_02.png3.73KB2.57KB▼ 31.07%
images/arrow_left_05.png5.47KB2.75KB▼ 49.78%
images/slide_empty_04.png2.92KB1.93KB▼ 33.80%
images/arrow_left_08.png3.94KB2.38KB▼ 39.54%