83% tabbed-contents

Code Review | Tabbed Contents Block

WordPress plugin Tabbed Contents Block scored83%from 54 tests.

About plugin

  • Plugin page: tabbed-contents
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Sep 27, 2023
  • Latest release: Oct 7, 2023
  • Number of updates: 15
  • Update frequency: every 0.7 days
  • Top authors: nftushar (86.67%)btechnologies (13.33%)abuhayat (13.33%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /205 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 gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.38ms] Passed 4 tests

A check of server-side resources used by Tabbed Contents Block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0840.14 ▲1.33
Dashboard /wp-admin3.37 ▲0.0343.93 ▼18.02
Posts /wp-admin/edit.php3.43 ▲0.0746.99 ▼0.25
Add New Post /wp-admin/post-new.php5.96 ▲0.0885.93 ▼8.59
Media Library /wp-admin/upload.php3.30 ▲0.0736.43 ▲2.28

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Tabbed Contents Block
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.29 ▼1.069.19 ▲6.7139.19 ▼5.78
Dashboard /wp-admin2,198 ▲185.60 ▲0.0282.74 ▼6.0236.01 ▲1.52
Posts /wp-admin/edit.php2,103 ▼01.94 ▼0.0937.47 ▲2.8831.50 ▼7.30
Add New Post /wp-admin/post-new.php6,370 ▲4,83428.29 ▲5.26851.20 ▲232.0135.15 ▼33.07
Media Library /wp-admin/upload.php1,403 ▲34.20 ▲0.04100.71 ▼1.7340.85 ▼1.24

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 fix the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant TCB_PLUGIN_VERSION - assumed 'TCB_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/tabbed-contents/dist/script.asset.php on line 3
    • > PHP Warning
      Use of undefined constant TCB_PLUGIN_VERSION - assumed 'TCB_PLUGIN_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/tabbed-contents/dist/editor.asset.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'TabContent' not found in wp-content/plugins/tabbed-contents/tab/block.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (Tab Contents), #2 (Settings)
  • Requires at least: Version format is invalid
The official readme.txt is a good inspiration

tabbed-contents/index.php 85% from 13 tests

The main file in "Tabbed Contents Block" v. 1.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • 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: The principal plugin file should be the same as the plugin slug ("tabbed-contents.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin355 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP44514202
JSON200146
CSS3175
JavaScript2022

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity15.50
▷ Minimum class complexity2.00
▷ Maximum class complexity29.00
Average method complexity3.42
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin