58% wp-expand-tabs-free

Code Review | WP Tabs - Responsive Tabs Plugin for WordPress

WordPress plugin WP Tabs - Responsive Tabs Plugin for WordPress scored58%from 54 tests.

About plugin

  • Plugin page: wp-expand-tabs-free
  • Plugin version: 2.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Mar 14, 2015
  • Latest release: Nov 2, 2023
  • Number of updates: 69
  • Update frequency: every 45.8 days
  • Top authors: shapedplugin (60.87%)rubel_miah (31.88%)Shamimmiashuhagh (5.8%)wpexpand (5.8%)

Code review

54 tests

User reviews

92 reviews

Install metrics

10,000+ active /152,239 total downloads

Benchmarks

Plugin footprint 48% 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.86MB] [CPU: ▲3.64ms] Passed 4 tests

This is a short check of server-side resources used by WP Tabs - Responsive Tabs Plugin for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.34 ▲0.8742.35 ▲1.62
Dashboard /wp-admin4.16 ▲0.8550.41 ▲3.65
Posts /wp-admin/edit.php4.21 ▲0.8552.96 ▲2.34
Add New Post /wp-admin/post-new.php6.77 ▲0.8792.37 ▲6.94
Media Library /wp-admin/upload.php4.09 ▲0.8545.48 ▲12.66
Tools /wp-admin/edit.php?post_type=sp_wp_tabs&page=tab_tools4.5449.05
Help /wp-admin/edit.php?post_type=sp_wp_tabs&page=tabs_help4.5448.11
Tab Groups /wp-admin/edit.php?post_type=sp_wp_tabs4.6467.02
Add New /wp-admin/post-new.php?post_type=sp_wp_tabs4.6964.44
Settings /wp-admin/edit.php?post_type=sp_wp_tabs&page=tabs_settings4.5449.75

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 172 new files
Database: no new tables, 13 new options
New WordPress options
wp_tabs_version
widget_recent-posts
wp_tabs_activation_date
widget_recent-comments
sp-tab__settings
widget_theysaidso_widget
widget_wptabs_widget
wp_tabs_db_version
wp_tabs_first_version
db_upgraded
...

Browser metrics Passed 4 tests

A check of browser resources used by WP Tabs - Responsive Tabs Plugin for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲17114.15 ▼0.251.75 ▲0.2729.71 ▼15.37
Dashboard /wp-admin2,311 ▲1345.56 ▼0.0785.89 ▼7.4738.03 ▼0.52
Posts /wp-admin/edit.php2,225 ▲1222.01 ▲0.0540.10 ▼1.8235.96 ▼1.22
Add New Post /wp-admin/post-new.php1,576 ▲4223.30 ▲4.91664.98 ▲69.5339.04 ▼22.72
Media Library /wp-admin/upload.php1,522 ▲1194.37 ▲0.1899.20 ▲1.2548.52 ▲5.34
Tools /wp-admin/edit.php?post_type=sp_wp_tabs&page=tab_tools1,4695.7774.7685.07
Help /wp-admin/edit.php?post_type=sp_wp_tabs&page=tabs_help2,21111.33316.90150.71
Tab Groups /wp-admin/edit.php?post_type=sp_wp_tabs1,5835.6063.5230.74
Add New /wp-admin/post-new.php?post_type=sp_wp_tabs5,0846.29117.77216.96
Settings /wp-admin/edit.php?post_type=sp_wp_tabs&page=tabs_settings1,4295.5764.9579.56

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Compile error in wp-content/plugins/wp-expand-tabs-free/plugin-main.php+46
    Cannot redeclare is_wp_tabs_pro() (previously declared in wp-content/plugins/wp-expand-tabs-free/plugin-main.php:47)
  • This plugin has failed uninstalling correctly, leaving 172 files (2.33MB) in the plugin directory
    • (new file) admin/GutenbergBlock/assets/wp-tabs-icon.svg
    • (new file) admin/ElementorAddons/class-wp-tabs-elementor-addons.php
    • (new file) admin/class-wp-tabs-admin.php
    • (new file) admin/class-wp-tabs-free-gutenberg-block.php
    • (new file) admin/GutenbergBlock/class-wp-tabs-free-gutenberg-block-init.php
    • (new file) admin/GutenbergBlock/build/index.asset.php
    • (new file) admin/GutenbergBlock/assets/wp-tabs-block-preview.svg
    • (new file) admin/ElementorAddons/widgets/shortcode.php
    • (new file) admin/GutenbergBlock/build/index.js
    • (new file) admin/css/elementor-icon.css
    • ...
  • Zombie WordPress options were found after uninstall: 14 options
    • wp_tabs_activation_date
    • db_upgraded
    • sp_wptabs_review_notice_dismiss
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • sp-tab__settings
    • recovery_mode_email_last_sent
    • widget_wptabs_widget
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-expand-tabs-free/public/partials/content.php
    • > /wp-content/plugins/wp-expand-tabs-free/public/partials/tabs-navigation.php
  • 47× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: post_id in wp-content/plugins/wp-expand-tabs-free/public/dynamic_style.php on line 116
    • > PHP Notice
      Undefined variable: post_id in wp-content/plugins/wp-expand-tabs-free/public/dynamic_style.php on line 180
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-expand-tabs-free/admin/ElementorAddons/class-wp-tabs-elementor-addons.php:110
    • > PHP Notice
      Undefined variable: post_id in wp-content/plugins/wp-expand-tabs-free/public/dynamic_style.php on line 216
    • > PHP Notice
      Undefined variable: post_id in wp-content/plugins/wp-expand-tabs-free/public/dynamic_style.php on line 235
    • > PHP Notice
      Undefined variable: sptpro_preloader in wp-content/plugins/wp-expand-tabs-free/public/preloader.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function update_option() in wp-content/plugins/wp-expand-tabs-free/includes/updates/update-2.2.0.php:8
    • > PHP Notice
      Undefined variable: post_id in wp-content/plugins/wp-expand-tabs-free/public/dynamic_style.php on line 204
    • > PHP Notice
      Undefined variable: post_id in wp-content/plugins/wp-expand-tabs-free/public/dynamic_style.php on line 170
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-expand-tabs-free/admin/preview/class-wp-tabs-preview.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: Too many tags (26 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

wp-expand-tabs-free/plugin-main.php 85% from 13 tests

"WP Tabs - Responsive Tabs Plugin for WordPress" version 2.2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-expand-tabs-free.php" instead of "plugin-main.php")
  • Description: The description should be shorter than 140 characters (currently 152 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected22,627 lines of code in 153 files:
LanguageFilesBlank linesComment linesLines of code
CSS171,0695067,842
PHP731,8783,3857,200
JavaScript111,2854194,627
SVG52042,958

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity22.63
▷ Minimum class complexity1.00
▷ Maximum class complexity186.00
Average method complexity5.37
▷ Minimum method complexity1.00
▷ Maximum method complexity83.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes52
▷ Abstract classes23.85%
▷ Concrete classes5096.15%
▷ Final classes00.00%
Methods258
▷ Static methods3011.63%
▷ Public methods20679.84%
▷ Protected methods4617.83%
▷ Private methods62.33%
Functions19
▷ Named functions1894.74%
▷ Anonymous functions15.26%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/images/Shaun-Snapp-min.png22.03KB22.05KB0.00%
admin/partials/img/dashboard-logo.png1.85KB0.69KB▼ 62.76%
admin/partials/models/assets/images/checkerboard.png2.29KB2.54KB0.00%