94% tabs-accordion

Code Review | Tabs & Accordion

WordPress plugin Tabs & Accordion scored 94% from 54 tests.

About plugin

  • Plugin page: tabs-accordion
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.8.3
  • WordPress version: 5.8.1
  • First release: Nov 13, 2017
  • Latest release: Nov 14, 2017
  • Number of updates: 6
  • Update frequency: every 0.7 days
  • Top authors: askkumar14 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 363 total downloads

Benchmarks

Plugin footprint Passed 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.09MB] [CPU: ▼139.41ms] Passed 4 tests

Analyzing server-side resources used by Tabs & Accordion
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1434.51 ▲9.64
Dashboard /wp-admin3.13 ▲0.0843.49 ▲8.04
Posts /wp-admin/edit.php3.18 ▲0.0841.27 ▼1.52
Add New Post /wp-admin/post-new.php5.72 ▲0.2882.25 ▼564.09
Media Library /wp-admin/upload.php3.09 ▲0.0930.86 ▼0.05
Add New /wp-admin/admin.php?page=add-new-tabs-accordion2.9933.21
Settings /wp-admin/admin.php?page=tabs-accordion-settings2.9927.56
Tabs & Accordion /wp-admin/admin.php?page=tabs-accordion2.9927.32

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Tabs & Accordion
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,734 ▲13816.10 ▲0.4811.77 ▲1.6944.13 ▼11.01
Dashboard /wp-admin3,014 ▲806.17 ▲0.24146.47 ▼10.80126.24 ▲20.07
Posts /wp-admin/edit.php2,805 ▲662.74 ▲0.0267.30 ▼0.0288.34 ▲1.44
Add New Post /wp-admin/post-new.php1,536 ▼4518.39 ▲3.96405.11 ▼1.07111.84 ▲0.99
Media Library /wp-admin/upload.php1,796 ▼145.05 ▲0.04190.84 ▲27.00138.00 ▲25.73
Add New /wp-admin/admin.php?page=add-new-tabs-accordion1,9504.17106.34162.40
Settings /wp-admin/admin.php?page=tabs-accordion-settings1,6332.3755.45126.28
Tabs & Accordion /wp-admin/admin.php?page=tabs-accordion1,3132.1050.1497.92

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tabs-accordion
    • > Notice in wp-content/plugins/tabs-accordion/tabs-accordion.php+41
    Undefined variable: plugin_path
    • > GET request to /wp-admin/admin.php?page=add-new-tabs-accordion
    • > Notice in wp-content/plugins/tabs-accordion/includes/pages/tbacc-add-new.php+147
    Undefined variable: tbacc_error
    • > GET request to /wp-admin/admin.php?page=add-new-tabs-accordion
    • > User deprecated in wp-includes/functions.php+5495
    wp_editor() was called with an argument that is deprecated since version 3.9.0! TinyMCE editor IDs cannot have brackets.
    • > GET request to /wp-admin/admin.php?page=tabs-accordion-settings
    • > Notice in wp-content/plugins/tabs-accordion/includes/pages/tbacc-settings.php+31
    Undefined variable: tbacc_key
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tabs-accordion-settings
    • > Notice in wp-content/plugins/tabs-accordion/includes/pages/tbacc-settings.php+214
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=tabs-accordion
    • > Notice in wp-content/plugins/tabs-accordion/includes/functions.php+75
    Undefined variable: paged
    • > GET request to /wp-admin/admin.php?page=tabs-accordion
    • > Notice in wp-content/plugins/tabs-accordion/includes/functions.php+75
    Undefined variable: items_per_page

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

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 Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: shortcode, accordion, tabs

tabs-accordion/tabs-accordion.php Passed 13 tests

The main PHP script in "Tabs & Accordion" version 1.0.0 is automatically included on every request by WordPress
78 characters long description:
A plugin to add tabs and accordion to the website with respect to window width

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
Good job! No executable or dangerous file extensions detected2,929 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript33641671,578
PHP511678878
CSS2216473

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
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%
Functions13
▷ Named functions13100.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
4 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250-rtl.png20.55KB20.55KB0.00%
assets/images/tbacc-sprite.png24.69KB7.83KB▼ 68.29%
assets/images/tbacc-icon.png0.73KB0.73KB0.00%
assets/icon-128x128.png4.73KB2.82KB▼ 40.24%