67% tabs-with-posts

Code Review | Tabs with Recommended Posts (Widget)

WordPress plugin Tabs with Recommended Posts (Widget) scored 67% from 54 tests.

About plugin

  • Plugin page: tabs-with-posts
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.7
  • WordPress version: 5.9.2
  • First release: Jun 3, 2021
  • Latest release: Jun 3, 2021
  • Number of updates: 5
  • Update frequency: every 4.0 days
  • Top authors: 9brada6 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 132 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲6.33MB] [CPU: ▼260.11ms] 75% from 4 tests

This is a short check of server-side resources used by Tabs with Recommended Posts (Widget)
Please fix the following
  • Extra RAM: The extra memory usage must be under 5MB (currently 6.33MB on /wp-admin/options-general.php?page=tabs_with_recommended_posts)
PageMemory (MB)CPU Time (ms)
Home /9.85 ▲6.3497.34 ▲47.07
Dashboard /wp-admin9.77 ▲6.3770.13 ▲35.47
Posts /wp-admin/edit.php10.00 ▲6.3674.28 ▲34.98
Add New Post /wp-admin/post-new.php13.24 ▲6.27137.68 ▼1,147.72
Media Library /wp-admin/upload.php9.66 ▲6.3661.37 ▲36.83
Freemius Debug [v.2.4.2] /wp-admin/admin.php?page=freemius9.9057.77
Tabs with Recommended Posts /wp-admin/options-general.php?page=tabs_with_recommended_posts9.7486.09

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 951 new files
Database: 1 new table, 8 new options
New tables
wp_twrp_widget_cache
New WordPress options
fs_gdpr
twrp__cache_refreshed_timestamp
fs_debug_mode
twrp__aside_options
widget_twrp_tabs_with_recommended_posts
fs_active_plugins
twrp__post_queries
fs_accounts

Browser metrics Passed 4 tests

Checking browser requirements for Tabs with Recommended Posts (Widget)
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /5,511 ▲1,75718.84 ▲2.887.06 ▼0.002.64 ▼0.96
Dashboard /wp-admin4,593 ▲1,7357.65 ▲1.42161.04 ▲21.49215.00 ▲48.10
Posts /wp-admin/edit.php4,419 ▲1,7314.83 ▲1.60132.15 ▲66.40358.33 ▲217.49
Add New Post /wp-admin/post-new.php3,351 ▲1,69020.70 ▲4.25500.20 ▲40.47185.98 ▲24.83
Media Library /wp-admin/upload.php3,407 ▲1,7066.47 ▲0.98163.66 ▲5.12207.24 ▲22.24
Freemius Debug [v.2.4.2] /wp-admin/admin.php?page=freemius3,1574.1596.24130.74
Tabs with Recommended Posts /wp-admin/options-general.php?page=tabs_with_recommended_posts15,3735.58113.50275.91

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
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/tabs-with-posts/freemius/includes/class-freemius.php+8552
    Undefined property: stdClass::$plugins
  • This plugin did not uninstall successfully, leaving 5 options in the database
    • fs_accounts
    • widget_twrp_tabs_with_recommended_posts
    • fs_gdpr
    • fs_active_plugins
    • fs_debug_mode

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
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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/tabs-with-posts/freemius/templates/ajax-loader.php
  • 128× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/tabs-with-posts/freemius/templates/account/partials/addon.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function freemius() in wp-content/plugins/tabs-with-posts/freemius/templates/partials/network-activation.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'TWRP\\Icons\\Icon_Definitions' not found in wp-content/plugins/tabs-with-posts/inc/Icons/Definitions/Comments_Disabled_Icons.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'TWRP\\Article_Block\\Article_Block_Locked' not found in wp-content/plugins/tabs-with-posts/inc/Article_Block/Blocks/Modern_Article.php:15
    • > PHP Fatal error
      Trait 'TWRP\\Utils\\Helper_Trait\\After_Setup_Theme_Init_Trait' not found in wp-content/plugins/tabs-with-posts/inc/Enqueue_Scripts/Enqueue_Scripts.php on line 29
    • > PHP Fatal error
      Uncaught Error: Class 'TWRP\\Plugins\\Known_Plugins\\Post_Views_Plugin' not found in wp-content/plugins/tabs-with-posts/inc/Plugins/Known_Plugins/Post_Views_Plugins/DFactory_Views_Plugin.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'TWRP\\Database\\Clean_Database' not found in wp-content/plugins/tabs-with-posts/inc/Database/General_Options.php:16
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/tabs-with-posts/freemius/templates/account/partials/addon.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'TWRP\\Admin\\Tabs\\Query_Options\\Query_Setting_Display' not found in wp-content/plugins/tabs-with-posts/inc/Admin/Tabs/Query_Options/Query_Settings_Display/Post_Comments_Display.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'TWRP\\Article_Block\\Article_Block' not found in wp-content/plugins/tabs-with-posts/inc/Article_Block/Blocks/Simple_Article.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 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
Attributes that require attention:
  • Screenshots: Add a description for screenshot #0 in tabs-with-posts/assets to your readme.txt
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === tabs-with-posts === )
You can look at the official readme.txt

tabs-with-posts/tabs-with-posts.php 85% from 13 tests

"Tabs with Recommended Posts (Widget)" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Domain Path: The domain path folder was not found ("/translations")
  • Description: The description should be shorter than 140 characters (currently 143 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected52,779 lines of code in 814 files:
LanguageFilesBlank linesComment linesLines of code
PHP26211,82122,82946,334
TypeScript288817292,731
Sass545111292,587
SVG4514502913
JavaScript53461197
CSS140017

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 2,907)
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity22.79
▷ Minimum class complexity1.00
▷ Maximum class complexity2,907.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces27
Interfaces5
Traits4
Classes233
▷ Abstract classes187.73%
▷ Concrete classes21592.27%
▷ Final classes00.00%
Methods2,284
▷ Static methods54023.64%
▷ Public methods1,64872.15%
▷ Protected methods30013.13%
▷ Private methods33614.71%
Functions100
▷ Named functions9595.00%
▷ Anonymous functions55.00%
Constants342
▷ Global constants9828.65%
▷ Class constants24471.35%
▷ Public constants244100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
13 PNG files occupy 0.19MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/plugin-avatars/YASR_Rating_Plugin.png2.37KB2.48KB0.00%
assets/screenshot-6.png112.43KB34.51KB▼ 69.31%
assets/plugin-avatars/DFactory_Views_Plugin.png3.31KB3.59KB0.00%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
assets/plugin-avatars/GamerZ_Views_Plugin.png0.97KB1.02KB0.00%