79% tab-my-content

Code Review | Tab My Content

WordPress plugin Tab My Content scored79%from 54 tests.

About plugin

  • Plugin page: tab-my-content
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.8
  • WordPress version: 6.3.1
  • First release: Jul 7, 2017
  • Latest release: Jul 8, 2017
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: eoni (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /712 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▼6.92ms] Passed 4 tests

Server-side resources used by Tab My Content
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1235.65 ▼4.67
Dashboard /wp-admin3.42 ▲0.1146.66 ▼3.29
Posts /wp-admin/edit.php3.53 ▲0.1746.29 ▼3.60
Add New Post /wp-admin/post-new.php6.02 ▲0.1383.81 ▼16.10
Media Library /wp-admin/upload.php3.34 ▲0.1135.78 ▼1.27
Add New /wp-admin/post-new.php?post_type=tab_my_content3.4957.08
All Tabs /wp-admin/edit.php?post_type=tab_my_content3.3836.62

Server storage [IO: ▲0.07MB] [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: 29 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Tab My Content
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9614.45 ▲0.071.61 ▼0.0438.75 ▼4.49
Dashboard /wp-admin2,237 ▲494.99 ▼0.82111.70 ▲2.8039.22 ▼7.16
Posts /wp-admin/edit.php2,103 ▲142.24 ▲0.2238.65 ▲3.2142.85 ▲9.22
Add New Post /wp-admin/post-new.php6,309 ▲4,79019.42 ▼3.78886.46 ▲206.4340.09 ▼16.41
Media Library /wp-admin/upload.php1,430 ▲424.31 ▲0.0993.01 ▼20.2742.00 ▼3.67
Add New /wp-admin/post-new.php?post_type=tab_my_content2,4467.87177.9383.18
All Tabs /wp-admin/edit.php?post_type=tab_my_content1,1032.1935.3837.49

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 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
Please take a closer look at the following
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/tab-my-content/public/partials/tab-my-content-shortcode-tabs.php
    • > /wp-content/plugins/tab-my-content/admin/partials/tab-my-content-admin-display.php
    • > /wp-content/plugins/tab-my-content/admin/partials/donate-button.php
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/tab-my-content/public/partials/tab-my-content-shortcode-tabs.php on line 7
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/tab-my-content/public/partials/tab-my-content-shortcode-tabs.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/tab-my-content/public/partials/tab-my-content-public-display.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/tab-my-content/admin/partials/sortable.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/tab-my-content/admin/partials/admin-header.php:3
    • > PHP Notice
      Undefined variable: tabs_content in wp-content/plugins/tab-my-content/public/partials/tab-my-content-shortcode-tabs.php on line 7
    • > PHP Notice
      Undefined variable: tabs in wp-content/plugins/tab-my-content/public/partials/tab-my-content-shortcode-tabs.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: content, tabs, tab

tab-my-content/tab-my-content.php Passed 13 tests

This is the main PHP file of "Tab My Content" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
124 characters long description:
Tab My Content is an easy way to add tabs inside your content, page or post. A lightweight and easy way to Tab your content.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected713 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP16137551449
CSS21321139
PO File1212677
JavaScript210048

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity5.29
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods36
▷ Static methods25.56%
▷ Public methods3186.11%
▷ Protected methods00.00%
▷ Private methods513.89%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin