77% mega-giga-tabs

Code Review | Mega-giga-tabs

WordPress plugin Mega-giga-tabs scored77%from 54 tests.

About plugin

  • Plugin page: mega-giga-tabs
  • Plugin version: 1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9.2
  • WordPress version: 6.3.1
  • First release: Dec 15, 2021
  • Latest release: Oct 5, 2022
  • Number of updates: 29
  • Update frequency: every 10.1 days
  • Top authors: akargzom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /619 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.07MB] [CPU: ▼3.42ms] Passed 4 tests

This is a short check of server-side resources used by Mega-giga-tabs
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0737.55 ▲1.26
Dashboard /wp-admin3.38 ▲0.0846.49 ▼0.24
Posts /wp-admin/edit.php3.43 ▲0.0751.54 ▲4.93
Add New Post /wp-admin/post-new.php5.97 ▲0.0883.78 ▼16.32
Media Library /wp-admin/upload.php3.30 ▲0.0735.04 ▲1.64
Tabs /wp-admin/edit.php?post_type=tabs3.3534.86
Tabs options /wp-admin/options-general.php?page=MGTZ-options3.2732.96
Add tabs block /wp-admin/post-new.php?post_type=tabs3.4245.28

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Mega-giga-tabs
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,865 ▲13013.31 ▼1.043.50 ▲1.8242.96 ▼1.74
Dashboard /wp-admin2,239 ▲514.87 ▼0.03104.92 ▼3.8940.15 ▼4.99
Posts /wp-admin/edit.php2,122 ▲302.02 ▼0.0438.94 ▼0.8835.69 ▲0.39
Add New Post /wp-admin/post-new.php1,556 ▲4223.13 ▲5.52594.90 ▼92.5870.17 ▲11.59
Media Library /wp-admin/upload.php1,418 ▲274.20 ▲0.0298.51 ▼2.0245.19 ▲2.19
Tabs /wp-admin/edit.php?post_type=tabs1,0861.9630.2930.44
Tabs options /wp-admin/options-general.php?page=MGTZ-options8072.0325.3523.87
Add tabs block /wp-admin/post-new.php?post_type=tabs2,1597.67164.4760.97

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mega-giga-tabs/mega-giga-tabs.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=MGTZ-options
    • > Javascript (severe) in unknown
    /wp-content/plugins/mega-giga-tabs/button.js?ver=6.3.1 3:8 Uncaught ReferenceError: tinymce is not defined

Optimizations

Plugin configuration 83% 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
Attributes that require attention:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4, #5 in mega-giga-tabs/assets to your readme.txt
  • License: Not defined
  • License uri: Please fix this invalid URI: ""
The official readme.txt is a good inspiration

mega-giga-tabs/mega-giga-tabs.php 85% from 13 tests

The main file in "Mega-giga-tabs" v. 1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

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
Everything looks great! No dangerous files found in this plugin608 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP1714248
CSS1490196
JavaScript210164

PHP code Passed 2 tests

A short 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.51
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 functions1076.92%
▷ Anonymous functions323.08%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin