83% squelch-tabs-and-accordions-shortcodes

Code Review | Squelch Tabs and Accordions Shortcodes

WordPress plugin Squelch Tabs and Accordions Shortcodes scored83%from 54 tests.

About plugin

  • Plugin page: squelch-tabs-and-...
  • Plugin version: 0.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 19, 2013
  • Latest release: Mar 15, 2023
  • Number of updates: 78
  • Update frequency: every 46.8 days
  • Top authors: squelch (100%)

Code review

54 tests

User reviews

23 reviews

Install metrics

1,000+ active /63,172 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼2.39ms] Passed 4 tests

Analyzing server-side resources used by Squelch Tabs and Accordions Shortcodes
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1147.62 ▲4.70
Dashboard /wp-admin3.40 ▲0.1050.11 ▼3.23
Posts /wp-admin/edit.php3.52 ▲0.1650.67 ▼0.85
Add New Post /wp-admin/post-new.php5.98 ▲0.0990.79 ▼7.29
Media Library /wp-admin/upload.php3.33 ▲0.0936.60 ▲1.80
Tabs and Accordions /wp-admin/themes.php?page=squelch-tabs-and-accordions-shortcodes/squelch-tabs-and-accordions.php3.5035.50

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 739 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
widget_recent-posts
squelch_taas_v
widget_theysaidso_widget
db_upgraded
squelch_taas_jquery_ui_theme
widget_recent-comments
squelch_taas_showmessage
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Squelch Tabs and Accordions Shortcodes
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲12714.09 ▼0.4814.11 ▲11.9741.79 ▲0.19
Dashboard /wp-admin2,199 ▲225.63 ▲0.0782.60 ▼13.2041.25 ▲1.11
Posts /wp-admin/edit.php2,104 ▲12.00 ▼0.0136.54 ▼6.3532.92 ▼4.82
Add New Post /wp-admin/post-new.php1,529 ▲323.20 ▲0.13677.73 ▲62.5960.06 ▼0.65
Media Library /wp-admin/upload.php1,407 ▲44.17 ▼0.0196.82 ▼1.4143.42 ▼0.11
Tabs and Accordions /wp-admin/themes.php?page=squelch-tabs-and-accordions-shortcodes/squelch-tabs-and-accordions.php1,0672.1627.5434.01

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 9 options in the database
    • widget_theysaidso_widget
    • squelch_taas_showmessage
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • squelch_taas_v
    • db_upgraded
    • can_compress_scripts
    • squelch_taas_jquery_ui_theme

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Undefined variable: squelch_taas_admin in wp-content/plugins/squelch-tabs-and-accordions-shortcodes/inc/admin.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/squelch-tabs-and-accordions-shortcodes/squelch-tabs-and-accordions.php:64

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

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

squelch-tabs-and-accordions-shortcodes/squelch-tabs-and-accordions.php 92% from 13 tests

The main PHP file in "Squelch Tabs and Accordions Shortcodes" ver. 0.4.3 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("squelch-tabs-and-accordions-shortcodes.php" instead of "squelch-tabs-and-accordions.php")

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
Good job! No executable or dangerous file extensions detected11,242 lines of code in 84 files:
LanguageFilesBlank linesComment linesLines of code
CSS779231,4149,983
PHP3229251684
JavaScript4189143575

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
653 PNG files occupy 1.82MB with 0.66MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/jquery-ui/jquery-ui-1.9.2/mint-choc/images/ui-bg_inset-soft_10_201913_1x100.png0.39KB0.17KB▼ 56.06%
css/jquery-ui/jquery-ui-1.9.2/start/images/ui-bg_glass_45_0078ae_1x400.png0.34KB0.16KB▼ 52.60%
css/jquery-ui/jquery-ui-1.9.2/redmond/images/ui-icons_f9bd01_256x240.png4.44KB4.17KB▼ 6.02%
css/jquery-ui/jquery-ui-1.9.2/dot-luv/images/ui-icons_9ccdfc_256x240.png4.44KB4.17KB▼ 6.02%
css/jquery-ui/jquery-ui-1.11.4/swanky-purse/images/ui-bg_diamond_8_443113_10x8.png0.30KB0.12KB▼ 61.61%