62% t4b-featured-slider

Code Review | T4B Featured Slider

WordPress plugin T4B Featured Slider scored62%from 54 tests.

About plugin

  • Plugin page: t4b-featured-slider
  • Plugin version: 1.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.1
  • WordPress version: 6.3.1
  • First release: Aug 29, 2013
  • Latest release: Sep 6, 2020
  • Number of updates: 56
  • Update frequency: every 45.8 days
  • Top authors: moviehour (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

20+ active /9,518 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼1.18ms] Passed 4 tests

A check of server-side resources used by T4B Featured Slider
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1852.23 ▲7.16
Dashboard /wp-admin3.38 ▲0.0861.53 ▲6.30
Posts /wp-admin/edit.php3.49 ▲0.1459.09 ▼0.91
Add New Post /wp-admin/post-new.php5.96 ▲0.0797.36 ▼17.25
Media Library /wp-admin/upload.php3.30 ▲0.0751.78 ▲11.24
Featured /wp-admin/admin.php?page=t4b_featured3.2751.80
Settings /wp-admin/admin.php?page=t4b_settings3.3256.01
Usage /wp-admin/admin.php?page=t4b-featured-slider/t4b_admin.php3.2849.36

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 22 new files
Database: 1 new table, 6 new options
New tables
wp_t4b_id_lists
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

T4B Featured Slider: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7914.54 ▲0.191.64 ▲0.0343.88 ▲0.21
Dashboard /wp-admin2,234 ▲544.89 ▼0.7786.76 ▼1.1770.88 ▲26.43
Posts /wp-admin/edit.php2,155 ▲552.32 ▲0.2636.80 ▲0.0438.61 ▼4.56
Add New Post /wp-admin/post-new.php1,567 ▲3923.09 ▼0.31670.64 ▲10.2639.38 ▼25.35
Media Library /wp-admin/upload.php1,451 ▲514.44 ▲0.25114.86 ▲6.6984.41 ▲41.92
Featured /wp-admin/admin.php?page=t4b_featured1,0832.0330.5235.00
Settings /wp-admin/admin.php?page=t4b_settings1,3922.0229.0434.72
Usage /wp-admin/admin.php?page=t4b-featured-slider/t4b_admin.php1,1192.0327.8741.90

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_t4b_id_lists
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/t4b-featured-slider/admin/usage.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/t4b-featured-slider/admin/settings.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function t4b_sidebar() in wp-content/plugins/t4b-featured-slider/admin/usage.php:59
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/t4b-featured-slider/t4b_featured_slider.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_featured_post_lists() in wp-content/plugins/t4b-featured-slider/admin/featured.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/t4b-featured-slider/t4b_admin.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=t4b-featured-slider/t4b_admin.php
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/t4b-featured-slider/js/t4b-admin.js?ver=1.5.1:27:21)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=t4b-featured-slider/t4b_admin.php
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (List of Featured Post.), #2 (Edit/Add Featured Post.), #3 (Slider Settings.), #4 (Featured Slider Display.)
You can take inspiration from this readme.txt

t4b-featured-slider/t4b_featured_slider.php 85% from 13 tests

The entry point to "T4B Featured Slider" version 1.5.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("t4b-featured-slider.php" instead of "t4b_featured_slider.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected677 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP6922570
JavaScript221164
CSS10443

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
11 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/red.png0.92KB0.93KB0.00%
images/coga.png2.87KB0.18KB▼ 93.63%
screenshot-1.png11.03KB10.19KB▼ 7.63%
images/cog.png0.22KB0.19KB▼ 17.39%
images/featured.png4.37KB1.54KB▼ 64.83%