78% tabs-shortcode-and-widget

Code Review | Tabs Shortcode and Widget

WordPress plugin Tabs Shortcode and Widget scored78%from 54 tests.

About plugin

  • Plugin page: tabs-shortcode-an...
  • Plugin version: 1.17
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.9
  • WordPress version: 6.3.1
  • First release: May 7, 2014
  • Latest release: Mar 29, 2022
  • Number of updates: 30
  • Update frequency: every 96.3 days
  • Top authors: OTWthemes (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /51,623 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.19MB] [CPU: ▼2.35ms] Passed 4 tests

Analyzing server-side resources used by Tabs Shortcode and Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2139.98 ▼3.33
Dashboard /wp-admin3.52 ▲0.2252.10 ▲0.85
Posts /wp-admin/edit.php3.57 ▲0.2154.65 ▲5.49
Add New Post /wp-admin/post-new.php6.06 ▲0.1794.27 ▼12.42
Media Library /wp-admin/upload.php3.40 ▲0.1742.28 ▲9.24
otwfcr /wp-admin/admin.php?page=otwfcr3.3735.55
License Manager /wp-admin/admin.php?page=otw-tsw-lm3.50251.01
Settings /wp-admin/admin.php?page=otw-tsw-settings3.3937.20

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 127 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_otw_shortcode_widget
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Tabs Shortcode and Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,965 ▲20814.23 ▼0.567.17 ▲5.2343.23 ▼4.61
Dashboard /wp-admin2,243 ▲555.02 ▲0.15113.33 ▲7.4082.49 ▲35.28
Posts /wp-admin/edit.php2,144 ▲552.35 ▲0.3239.52 ▲4.5333.93 ▼0.44
Add New Post /wp-admin/post-new.php6,463 ▲4,94428.75 ▲5.42920.15 ▲327.2436.83 ▼16.42
Media Library /wp-admin/upload.php1,446 ▲584.52 ▲0.3394.54 ▼0.5169.05 ▲29.67
otwfcr /wp-admin/admin.php?page=otwfcr8221.8629.7427.29
License Manager /wp-admin/admin.php?page=otw-tsw-lm9681.8831.3326.21
Settings /wp-admin/admin.php?page=otw-tsw-settings9202.0528.2238.60

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_otw_shortcode_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/tabs-shortcode-and-widget/include/otw_components/otw_factory/views/action_message.php
    • > /wp-content/plugins/tabs-shortcode-and-widget/include/otw_components/otw_shortcode/libs/recaptcha-php-1.11/example-mailhide.php
  • 14× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'OTW_Shortcodes' not found in wp-content/plugins/tabs-shortcode-and-widget/include/otw_components/otw_shortcode/shortcodes/otw_shortcode_tabslayout.class.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/tabs-shortcode-and-widget/include/otw_labels/otw_tsw_shortcode_object.labels.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/tabs-shortcode-and-widget/include/otw_labels/otw_tsw_factory_object.labels.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function otw_post() in wp-content/plugins/tabs-shortcode-and-widget/include/otw_components/otw_shortcode/libs/recaptcha-php-1.11/example-captcha.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'OTW_Component' not found in wp-content/plugins/tabs-shortcode-and-widget/include/otw_components/otw_factory/otw_factory.class.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/tabs-shortcode-and-widget/include/otw_tsw_settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/tabs-shortcode-and-widget/otw_content_manager.php:11
    • > PHP Notice
      Undefined variable: return_url in wp-content/plugins/tabs-shortcode-and-widget/include/otw_components/otw_factory/views/action_message.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function otw_post() in wp-content/plugins/tabs-shortcode-and-widget/include/otw_tsw_process_actions.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'OTW_Component' not found in wp-content/plugins/tabs-shortcode-and-widget/include/otw_components/otw_shortcode/otw_shortcode.class.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (WYSIWYG page/post editor button), #2 (OTW Shortcode Widget), #3 (Tabs Options), #4 (Front-end)
You can look at the official readme.txt

tabs-shortcode-and-widget/otw_content_manager.php 92% from 13 tests

The principal PHP file in "Tabs Shortcode and Widget" v. 1.17 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("tabs-shortcode-and-widget.php" instead of "otw_content_manager.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin17,114 lines of code in 60 files:
LanguageFilesBlank linesComment linesLines of code
CSS144721137,722
PHP271,4269184,605
SVG4002,709
JavaScript145061322,061
JSON10017

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity76.67
▷ Minimum class complexity1.00
▷ Maximum class complexity193.00
Average method complexity5.28
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods159
▷ Static methods2213.84%
▷ Public methods12075.47%
▷ Protected methods2716.98%
▷ Private methods127.55%
Functions46
▷ Named functions46100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
35 PNG files occupy 0.21MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png72.18KB31.35KB▼ 56.56%
include/otw_components/otw_shortcode/images/gm-edit.png0.31KB0.38KB0.00%
include/otw_components/otw_form/img/colorpicker/colorpicker_hsb_s.png1.14KB0.80KB▼ 29.97%
images/otw-sbm-icon.png0.13KB0.14KB0.00%
screenshot-1.png19.37KB8.23KB▼ 57.53%