72% responsive-accordion-tabs

Code Review | Responsive Accordion Tabs

WordPress plugin Responsive Accordion Tabs scored 72% from 54 tests.

About plugin

  • Plugin page: responsive-accord...
  • Plugin version: 1.4.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 17, 2022
  • Latest release: Jun 20, 2023
  • Number of updates: 17
  • Update frequency: every 21.7 days
  • Top authors: reholmes27 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 476 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲5.41MB] [CPU: ▲24.76ms] 50% from 4 tests

Server-side resources used by Responsive Accordion Tabs
Please take the time to fix the following items
  • CPU: Total CPU usage should be kept under 500.00ms (currently 2,183.94ms on /wp-admin/options-general.php?page=ratabs-settings-group)
  • Extra RAM: Extra memory usage should kept under 5MB (currently 5.41MB on /wp-admin/post-new.php?post_type=accordion-tabs)
PageMemory (MB)CPU Time (ms)
Home /9.21 ▲5.7570.96 ▲27.22
Dashboard /wp-admin9.23 ▲5.9274.09 ▲25.37
Posts /wp-admin/edit.php9.23 ▲5.8770.64 ▲18.75
Add New Post /wp-admin/post-new.php9.97 ▲4.09126.22 ▲27.71
Media Library /wp-admin/upload.php9.23 ▲6.0069.09 ▲34.37
Freemius Debug [v.2.5.9] /wp-admin/admin.php?page=freemius9.2356.81
All Accordion Tabs /wp-admin/edit.php?post_type=accordion-tabs9.2362.07
Accordion Tabs /wp-admin/options-general.php?page=ratabs-settings-group9.232,183.94
Add New /wp-admin/post-new.php?post_type=accordion-tabs9.2369.14

Server storage [IO: ▲3.29MB] [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: 205 new files
Database: no new tables, 11 new options
New WordPress options
ratabs_settings_defaults
db_upgraded
ratabs_version
fs_debug_mode
fs_active_plugins
can_compress_scripts
widget_recent-comments
widget_recent-posts
fs_accounts
theysaidso_admin_options
...

Browser metrics Passed 4 tests

Responsive Accordion Tabs: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,885 ▲15013.57 ▼0.731.84 ▲0.0030.86 ▼19.31
Dashboard /wp-admin2,279 ▲885.16 ▲0.26107.13 ▲4.3144.97 ▲1.59
Posts /wp-admin/edit.php2,169 ▲772.37 ▲0.3141.01 ▼4.6037.99 ▲0.88
Add New Post /wp-admin/post-new.php1,570 ▲3623.31 ▲0.21648.79 ▲53.9533.81 ▼12.67
Media Library /wp-admin/upload.php1,467 ▲854.44 ▲0.2199.92 ▲1.3945.64 ▲2.11
Freemius Debug [v.2.5.9] /wp-admin/admin.php?page=freemius1,1432.1029.2428.85
All Accordion Tabs /wp-admin/edit.php?post_type=accordion-tabs1,1552.2934.6730.22
Accordion Tabs /wp-admin/options-general.php?page=ratabs-settings-group1,0382.0927.9061.81
Add New /wp-admin/post-new.php?post_type=accordion-tabs2,5487.85177.8370.13

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 without warnings or errors
    • > Notice in wp-content/plugins/responsive-accordion-tabs/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 11 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • ratabs_settings_defaults
    • fs_active_plugins
    • widget_recent-comments
    • fs_accounts
    • ratabs_version
    • fs_debug_mode
    • widget_theysaidso_widget
    • ...

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 errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=accordion-tabs
    • > Notice in wp-content/plugins/responsive-accordion-tabs/includes/admin/class-posts.php+257
    Undefined variable: key

SRP Passed 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
Congratulations! This plugin passed the SRP test

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 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Example of transparent theme), #2 (Example of dark theme), #3 (Example of light theme), #4 (Styles admin page (Pro version)), #5 (Mobile accordion view)
  • Requires at least: Version format is invalid
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
You can take inspiration from this readme.txt

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

Analyzing the main PHP file in "Responsive Accordion Tabs" version 1.4.1
70 characters long description:
Add tabs to your website that convert to accordions on smaller screens

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin37,339 lines of code in 158 files:
LanguageFilesBlank linesComment linesLines of code
PHP1308,20217,28234,648
JavaScript92073301,376
CSS1845541,298
JSON10017

PHP code 50% from 2 tests

Analyzing cyclomatic complexity and code structure
The following items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,079)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity80.02
▷ Minimum class complexity1.00
▷ Maximum class complexity3,079.00
Average method complexity4.49
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes58
▷ Abstract classes23.45%
▷ Concrete classes5696.55%
▷ Final classes00.00%
Methods1,342
▷ Static methods19914.83%
▷ Public methods95371.01%
▷ Protected methods171.27%
▷ Private methods37227.72%
Functions95
▷ Named functions95100.00%
▷ Anonymous functions00.00%
Constants148
▷ Global constants10168.24%
▷ Class constants4731.76%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/responsive-accordion-tabs.png27.21KB11.04KB▼ 59.42%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%