84% responsive-tab-widget

Code Review | Responsive Tab Widget

WordPress plugin Responsive Tab Widget scored 84% from 54 tests.

About plugin

  • Plugin page: responsive-tab-wi...
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.7.1
  • WordPress version: 5.8.1
  • First release: Dec 7, 2013
  • Latest release: Dec 9, 2013
  • Number of updates: 8
  • Update frequency: every 0.4 days
  • Top authors: basantakumar (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active / 3,614 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼143.92ms] Passed 4 tests

This is a short check of server-side resources used by Responsive Tab Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.0532.81 ▼4.77
Dashboard /wp-admin3.10 ▲0.0446.53 ▼2.34
Posts /wp-admin/edit.php3.15 ▲0.0447.62 ▲0.91
Add New Post /wp-admin/post-new.php5.45 ▲0.0288.38 ▼567.11
Media Library /wp-admin/upload.php3.04 ▲0.0432.30 ▼1.45

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 1 new option
New WordPress options
widget_respo_tab_widget

Browser metrics Passed 4 tests

Checking browser requirements for Responsive Tab Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,826 ▲24417.51 ▲1.6422.41 ▲10.9550.62 ▲4.11
Dashboard /wp-admin2,970 ▲395.92 ▼0.27144.29 ▼10.12109.48 ▼7.73
Posts /wp-admin/edit.php2,739 ▼02.72 ▼0.0071.54 ▲9.0289.89 ▲5.47
Add New Post /wp-admin/post-new.php1,604 ▼6818.83 ▼0.05393.13 ▼25.26108.56 ▲4.53
Media Library /wp-admin/upload.php1,807 ▼05.06 ▲0.01166.17 ▲7.55115.16 ▲0.80

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
Please fix the following items
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_respo_tab_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/responsive-tab-widget/respo-tab-widget.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: sidebar, posts, widget

responsive-tab-widget/respo-tab-widget.php 92% from 13 tests

The principal PHP file in "Responsive Tab Widget" v. 0.2 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("responsive-tab-widget.php" instead of "respo-tab-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected230 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP18244150
CSS13477
JavaScript1003

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.16MB with 0.11MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png158.48KB31.74KB▼ 79.97%
screenshot-1.png9.37KB4.73KB▼ 49.50%