10% alobaidi-slider

Code Review | Alobaidi Slider

WordPress plugin Alobaidi Slider scored10%from 54 tests.

About plugin

  • Plugin page: alobaidi-slider
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.6
  • WordPress version: 6.3.1
  • First release: Oct 27, 2015
  • Latest release: Aug 21, 2016
  • Number of updates: 8
  • Update frequency: every 37.4 days
  • Top authors: Alobaidi (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,616 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/alobaidi-slider/widget.php+7
    Methods with the same name as their class will not be constructors in a future version of PHP; AlobaidiSliderWidget has a deprecated constructor

Server metrics [RAM: ▼1.88MB] [CPU: ▼54.71ms] Passed 4 tests

A check of server-side resources used by Alobaidi Slider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.11 ▼1.354.90 ▼35.93
Dashboard /wp-admin2.13 ▼1.216.20 ▼57.60
Posts /wp-admin/edit.php2.13 ▼1.228.43 ▼35.27
Add New Post /wp-admin/post-new.php2.13 ▼3.755.99 ▼90.04
Media Library /wp-admin/upload.php2.13 ▼1.095.49 ▼30.36
Alobaidi Slider /wp-admin/plugins.php?page=alobaidi_slider_shortocodes2.147.14

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

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

Browser metrics Passed 4 tests

Alobaidi Slider: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲14113.59 ▼0.816.36 ▲4.7044.69 ▲0.99
Dashboard /wp-admin2,213 ▲254.88 ▼0.04100.63 ▼14.0637.97 ▼9.51
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0634.40 ▼0.8632.88 ▼1.86
Add New Post /wp-admin/post-new.php1,522 ▲323.21 ▲0.07685.92 ▼35.0751.53 ▼10.06
Media Library /wp-admin/upload.php1,395 ▲74.21 ▲0.0297.50 ▼24.0344.07 ▼2.66
Alobaidi Slider /wp-admin/plugins.php?page=alobaidi_slider_shortocodes8352.0124.4130.15

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/alobaidi-slider/widget.php+7
    Methods with the same name as their class will not be constructors in a future version of PHP; AlobaidiSliderWidget has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_alobaidisliderwidget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

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)
These server-side errors were triggered
    • > GET request to /wp-admin/plugins.php?page=alobaidi_slider_shortocodes
    • > Deprecated in wp-content/plugins/alobaidi-slider/widget.php+7
    Methods with the same name as their class will not be constructors in a future version of PHP; AlobaidiSliderWidget has a deprecated constructor
    • > GET request to /wp-admin/plugins.php?page=alobaidi_slider_shortocodes
    • > Deprecated in wp-content/plugins/alobaidi-slider/widget.php+130
    Function create_function() is deprecated

SRP 50% from 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 following issues need your attention
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/alobaidi-slider/alobaidi-slider.php
    • > /wp-content/plugins/alobaidi-slider/widget.php
    • > /wp-content/plugins/alobaidi-slider/shortcodes-page.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Tags: Too many tags (29 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

alobaidi-slider/alobaidi-slider.php 92% from 13 tests

The primary PHP file in "Alobaidi Slider" version 1.0.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 180 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin664 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP49330337
CSS1517292
JavaScript113335

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/alobaidi_slider_prev.png1.99KB1.62KB▼ 18.50%
images/alobaidi_slider_next.png2.01KB1.68KB▼ 16.59%