73% slider-matches-results

Code Review | Slider Matches Results

WordPress plugin Slider Matches Results scored 73% from 54 tests.

About plugin

  • Plugin page: slider-matches-re...
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.9.8
  • WordPress version: 5.8.1
  • First release: May 19, 2018
  • Latest release: Sep 18, 2018
  • Number of updates: 17
  • Update frequency: every 7.5 days
  • Top authors: cedche99 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 572 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.36MB] [CPU: ▼135.96ms] Passed 4 tests

Server-side resources used by Slider Matches Results
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.11 ▲0.3940.83 ▲13.90
Dashboard /wp-admin3.46 ▲0.4047.11 ▼2.17
Posts /wp-admin/edit.php3.51 ▲0.4046.18 ▲3.32
Add New Post /wp-admin/post-new.php5.76 ▲0.3294.79 ▼549.39
Media Library /wp-admin/upload.php3.34 ▲0.3435.26 ▲4.42
Create slider /wp-admin/admin.php?page=smr_plugin_create_slider3.4638.33
Update slider /wp-admin/admin.php?page=smr_plugin_update_slider3.3829.19
Teams /wp-admin/admin.php?page=smr_plugin_teams3.4235.36
Matches /wp-admin/admin.php?page=smr_plugin_matches3.4234.74
Settings /wp-admin/admin.php?page=smr_plugin_settings3.6831.25
Sliders /wp-admin/admin.php?page=smr_plugin_sliders3.3333.35

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 67 new files
Database: 2 new tables, 4 new options
New tables
wp_smr_matches
wp_smr_teams
New WordPress options
recovery_mode_email_last_sent
smr_state_active
smr_db_version
smr_options_settings

Browser metrics Passed 4 tests

Checking browser requirements for Slider Matches Results
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,764 ▲16815.92 ▲0.269.42 ▼0.1447.23 ▼3.37
Dashboard /wp-admin3,035 ▲1045.92 ▼0.02138.12 ▼5.30114.19 ▼5.02
Posts /wp-admin/edit.php2,800 ▲612.74 ▲0.0364.26 ▲2.2289.37 ▲4.58
Add New Post /wp-admin/post-new.php1,711 ▲3918.77 ▲0.04367.57 ▼3.06110.18 ▼14.58
Media Library /wp-admin/upload.php1,868 ▲585.15 ▲0.10151.94 ▲9.35121.72 ▼1.95
Create slider /wp-admin/admin.php?page=smr_plugin_create_slider3,0463.25106.69124.51
Update slider /wp-admin/admin.php?page=smr_plugin_update_slider2,9993.6793.38103.63
Teams /wp-admin/admin.php?page=smr_plugin_teams1,0812.5546.3376.85
Matches /wp-admin/admin.php?page=smr_plugin_matches2,0084.04101.0599.30
Settings /wp-admin/admin.php?page=smr_plugin_settings4,4404.00112.71150.47
Sliders /wp-admin/admin.php?page=smr_plugin_sliders1,4233.2581.6499.00

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options were found after uninstall: 1 option
    • recovery_mode_email_last_sent

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1770
    Undefined index: id
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1779
    Trying to get property 'id' of non-object
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1779
    Trying to get property 'name' of non-object
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1781
    Trying to get property 'settings' of non-object
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1796
    Trying to get property 'slider' of non-object
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1784
    Trying to get property 'header' of non-object
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1786
    Trying to get property 'date_text_color' of non-object
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1786
    Trying to get property 'date_background_color' of non-object
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1786
    Trying to get property 'title_text_color' of non-object
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1786
    Trying to get property 'title_background_color' of non-object
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1788
    Trying to get property 'content' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1794
    Trying to get property 'text_color' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1794
    Trying to get property 'background_color' of non-object
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1790
    Trying to get property 'max_width_logo' of non-object
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1792
    Trying to get property 'footer' of non-object
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1794
    Trying to get property 'display_footer' of non-object
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1796
    Trying to get property 'slide' of non-object
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1798
    Trying to get property 'infinite' of non-object
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1798
    Trying to get property 'dots' of non-object
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1798
    Trying to get property 'dots_color' of non-object
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1798
    Trying to get property 'autoplay' of non-object
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1798
    Trying to get property 'autoplay_speed' of non-object
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1798
    Trying to get property 'arrows' of non-object
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1798
    Trying to get property 'arrows_color' of non-object
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1798
    Trying to get property 'arrows_in' of non-object
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1798
    Trying to get property 'fade' of non-object
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1798
    Trying to get property 'transition_type' of non-object
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1798
    Trying to get property 'transition_speed' of non-object
    • > GET request to /wp-admin/admin.php?page=smr_plugin_update_slider
    • > Notice in wp-content/plugins/slider-matches-results/slider-matches-results.php+1798
    Trying to get property 'swipe' of non-object
    • > GET request to /wp-admin/admin.php?page=smr_plugin_teams
    • > Notice in wp-content/plugins/slider-matches-results/templates/teams.php+76
    Undefined variable: team
    • > GET request to /wp-admin/admin.php?page=smr_plugin_teams
    • > Error in wp-content/plugins/slider-matches-results/templates/teams.php+76
    Uncaught Error: Call to a member function get_id() on null in wp-content/plugins/slider-matches-results/templates/teams.php:76
    Stack trace:
    #0 wp-content/plugins/slider-matches-results/slider-matches-results.php(1823): require_once()
    #1 wp-includes/class-wp-hook.php(303): Slider_Matches_Results->teams_index()
    #2 wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(470): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 {main}
    thrown

SRP 0% from 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
Please fix the following
  • 20× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/slider-matches-results/templates/teams.php
    • > /wp-content/plugins/slider-matches-results/inc/additional/smr_css.php
    • > /wp-content/plugins/slider-matches-results/inc/class/match.php
    • > /wp-content/plugins/slider-matches-results/inc/ajax/matches.php
    • > /wp-content/plugins/slider-matches-results/inc/additional/settings.php
    • > /wp-content/plugins/slider-matches-results/inc/ajax/sliders.php
    • > /wp-content/plugins/slider-matches-results/inc/class/settings_slider_header.php
    • > /wp-content/plugins/slider-matches-results/inc/class/settings_slider_slide.php
    • > /wp-content/plugins/slider-matches-results/inc/ajax/teams.php
    • > /wp-content/plugins/slider-matches-results/slider-matches-results.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/slider-matches-results/templates/create_slider.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/slider-matches-results/templates/update_slider.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/slider-matches-results/templates/settings.php:4

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

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • License uri: Please fix this invalid url: ""
Please take inspiration from this readme.txt

slider-matches-results/slider-matches-results.php Passed 13 tests

Analyzing the main PHP file in "Slider Matches Results" version 1.0.5
83 characters long description:
Allows you to create specific sliders for your sports team (Football, Handball ...)

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,104 lines of code in 60 files:
LanguageFilesBlank linesComment linesLines of code
PHP241,0901,9883,832
JavaScript22605833,463
CSS106236526
PO File190161225
JSON20045
SVG11013

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity13.09
▷ Minimum class complexity1.00
▷ Maximum class complexity107.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods179
▷ Static methods00.00%
▷ Public methods17899.44%
▷ Protected methods10.56%
▷ Private methods00.00%
Functions24
▷ Named functions2395.83%
▷ Anonymous functions14.17%
Constants15
▷ Global constants00.00%
▷ Class constants15100.00%
▷ Public constants15100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected