77% rubytabs-lite

Code Review | RubyTabs Lite

WordPress plugin RubyTabs Lite scored77%from 54 tests.

About plugin

  • Plugin page: rubytabs-lite
  • Plugin version: 1.031
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.4.1
  • WordPress version: 6.3.1
  • First release: Feb 2, 2016
  • Latest release: Feb 2, 2016
  • Number of updates: 4
  • Update frequency: every 5.0 days
  • Top authors: HaiBach (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,016 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▲0.64ms] Passed 4 tests

This is a short check of server-side resources used by RubyTabs Lite
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1641.12 ▼4.82
Dashboard /wp-admin3.46 ▲0.1652.44 ▼2.24
Posts /wp-admin/edit.php3.57 ▲0.2254.39 ▲5.71
Add New Post /wp-admin/post-new.php6.04 ▲0.15110.15 ▲15.17
Media Library /wp-admin/upload.php3.38 ▲0.1538.18 ▲3.90

Server storage [IO: ▲0.64MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 70 new files
Database: no new tables, 9 new options
New WordPress options
rt03
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_rubytabs_widget
ruby01VA
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for RubyTabs Lite
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲16713.74 ▼0.585.61 ▲3.8040.58 ▼1.02
Dashboard /wp-admin2,222 ▲344.92 ▼0.91105.50 ▼1.6677.93 ▲32.77
Posts /wp-admin/edit.php2,117 ▲281.99 ▲0.0040.69 ▲0.1536.61 ▼1.41
Add New Post /wp-admin/post-new.php1,706 ▲17624.49 ▲5.87721.79 ▲86.7562.68 ▲5.84
Media Library /wp-admin/upload.php1,410 ▲284.21 ▲0.02103.96 ▲3.8572.82 ▲28.21

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • widget_rubytabs_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 fix the following
  • 12× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/rubytabs-lite/admin/part-options.php
    • > /wp-content/plugins/rubytabs-lite/admin/part-inline.php
    • > /wp-content/plugins/rubytabs-lite/admin/nav-alltabs.php
    • > /wp-content/plugins/rubytabs-lite/admin/page-alltabs.php
    • > /wp-content/plugins/rubytabs-lite/admin/part-import-export.php
    • > /wp-content/plugins/rubytabs-lite/admin/nav-footer.php
    • > /wp-content/plugins/rubytabs-lite/admin/part-options-swipe.php
    • > /wp-content/plugins/rubytabs-lite/admin/part-options-position.php
    • > /wp-content/plugins/rubytabs-lite/admin/page-hidden.php
    • > /wp-content/plugins/rubytabs-lite/admin/part-options-other.php
  • 109× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: jsData in wp-content/plugins/rubytabs-lite/admin/part-options-swipe.php on line 15
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/rubytabs-lite/admin/part-options-position.php on line 36
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/rubytabs-lite/admin/page-tabs.php on line 22
    • > PHP Notice
      Undefined variable: jsData in wp-content/plugins/rubytabs-lite/admin/part-options-swipe.php on line 26
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/rubytabs-lite/admin/part-options-skin.php on line 15
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/rubytabs-lite/admin/part-options.php on line 67
    • > PHP Notice
      Undefined variable: contents in wp-content/plugins/rubytabs-lite/admin/page-slide.php on line 151
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/rubytabs-lite/admin/part-options-swipe.php on line 37
    • > PHP Notice
      Undefined variable: opts_main in wp-content/plugins/rubytabs-lite/admin/page-tabs.php on line 10
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/rubytabs-lite/admin/part-options-effect.php on line 45

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === rubytabs-lite === )
  • Tags: There are too many tags (15 tag instead of maximum 10)
  • Screenshots: Add images for these screenshots: #1 (Admin page All-Tabs), #2 (Admin page Tabs Editor)
You can take inspiration from this readme.txt

rubytabs-lite/rubytabs_lite.php 92% from 13 tests

Analyzing the main PHP file in "RubyTabs Lite" version 1.031
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("rubytabs-lite.php" instead of "rubytabs_lite.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected4,286 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
CSS88822941,747
PHP229085231,479
SVG144914789
JSON1360198
JavaScript10464573

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity11.00
▷ Minimum class complexity8.00
▷ Maximum class complexity15.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1477.78%
▷ Protected methods00.00%
▷ Private methods422.22%
Functions28
▷ Named functions2692.86%
▷ Anonymous functions27.14%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
11 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ruby/imgs/pattern-dot-dark.png0.11KB0.10KB▼ 12.17%
ruby/imgs/icon-nav.png1.19KB1.13KB▼ 5.16%
ruby/imgs/icon-playpause.png0.38KB0.26KB▼ 31.98%
ruby/imgs/grab.png1.10KB0.16KB▼ 85.45%
admin/imgs/rb01close.png0.16KB0.13KB▼ 17.39%