72% tabut-companion

Code Review | Tabut Companion

WordPress plugin Tabut Companion scored 72% from 54 tests.

About plugin

  • Plugin page: tabut-companion
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.2
  • WordPress version: 5.8.1
  • First release: Apr 26, 2019
  • Latest release: May 8, 2019
  • Number of updates: 3
  • Update frequency: every 4.0 days
  • Top authors: naveenkharwar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 828 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼151.88ms] Passed 4 tests

Analyzing server-side resources used by Tabut Companion
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1524.49 ▲9.49
Dashboard /wp-admin3.09 ▲0.0238.77 ▲1.08
Posts /wp-admin/edit.php3.18 ▲0.0730.80 ▲0.06
Add New Post /wp-admin/post-new.php5.57 ▲0.1369.25 ▼607.47
Media Library /wp-admin/upload.php3.03 ▲0.0322.13 ▼1.19
All Items /wp-admin/edit.php?post_type=portfolio3.0822.91
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=portfolio3.1924.00
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=portfolio3.0225.21
Add New /wp-admin/post-new.php?post_type=portfolio5.5666.14

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 1 new option
New WordPress options
category_children

Browser metrics Passed 4 tests

Checking browser requirements for Tabut Companion
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,880 ▲27916.11 ▲0.448.16 ▲2.8776.19 ▲0.63
Dashboard /wp-admin2,980 ▲816.10 ▼0.08114.92 ▼19.63161.84 ▼11.03
Posts /wp-admin/edit.php2,791 ▲483.25 ▲0.0261.26 ▼1.82137.85 ▼1.29
Add New Post /wp-admin/post-new.php3,737 ▼7118.67 ▼0.14432.06 ▼20.32159.32 ▼17.47
Media Library /wp-admin/upload.php1,800 ▲485.55 ▲0.03159.98 ▲11.25188.03 ▼6.92
All Items /wp-admin/edit.php?post_type=portfolio1,5193.0658.73121.15
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=portfolio1,8922.7756.91124.80
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=portfolio1,9762.7857.25138.71
Add New /wp-admin/post-new.php?post_type=portfolio6,15220.16409.82186.57

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
The following items require your attention
  • The uninstall procedure has failed, leaving 1 option in the database
    • category_children

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/tabut-companion/public/partials/tabut-companion-public-display.php
    • > /wp-content/plugins/tabut-companion/admin/partials/tabut-companion-admin-display.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tabut-companion/admin/partials/custom-post-type/portfolio.php:60
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/tabut-companion/admin/class-tabut-companion-admin.php:105

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/post-new.php?post_type=portfolio
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=7ed7fe32dad771c4e0af4f56539ff156+1:40463
    Block validation: Expected attribute `%s` of value `%s`, saw `%s`." "style" "height:100px" "height:5px
    • > GET request to /wp-admin/post-new.php?post_type=portfolio
    • > Console-api (severe) in wp-includes/js/dist/blocks.min.js?ver=7ed7fe32dad771c4e0af4f56539ff156+1:40463
    Block validation: Block validation failed for `%s` (%o).\n\nContent generated by `save` function:\n\n%s\n\nContent retrieved from post body:\n\n%s" "core/spacer" Object "\u003Cdiv style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\">\u003C/div>" "\u003Cdiv style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\">\u003C/div>

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === tabut-companion === )
The official readme.txt might help

tabut-companion/tabut-companion.php 92% from 13 tests

The entry point to "Tabut Companion" version 2.0.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 201 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected317 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP13131560311
JavaScript24546
CSS2080

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity2.88
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.52
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
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
No PNG files were detected