78% the-tech-tribe

Code Review | The Tribal Plugin

WordPress plugin The Tribal Plugin scored78%from 54 tests.

About plugin

  • Plugin page: the-tech-tribe
  • Plugin version: 1.2.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Nov 11, 2021
  • Latest release: Oct 12, 2023
  • Number of updates: 17
  • Update frequency: every 41.2 days
  • Top authors: nigelmoore1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

800+ active /5,068 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.21MB] [CPU: ▼6.98ms] Passed 4 tests

Analyzing server-side resources used by The Tribal Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2141.33 ▲3.50
Dashboard /wp-admin3.56 ▲0.2248.92 ▼7.00
Posts /wp-admin/edit.php3.62 ▲0.2646.90 ▼0.70
Add New Post /wp-admin/post-new.php6.08 ▲0.2081.58 ▼19.07
Media Library /wp-admin/upload.php3.43 ▲0.2035.74 ▼1.15

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 59 new files
Database: no new tables, 12 new options
New WordPress options
widget_recent-posts
ttt_client_last_check_status
ttt_client_import_job_start
widget_recent-comments
ttt_client_import_return
widget_theysaidso_widget
ttt_client_last_checked
theysaidso_admin_options
can_compress_scripts
db_upgraded
...

Browser metrics Passed 4 tests

A check of browser resources used by The Tribal Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲3914.25 ▼0.101.79 ▲0.2443.72 ▲3.00
Dashboard /wp-admin2,194 ▲175.75 ▲0.2292.37 ▲7.2669.69 ▲26.87
Posts /wp-admin/edit.php2,108 ▲81.97 ▼0.0134.14 ▼4.1734.77 ▲1.47
Add New Post /wp-admin/post-new.php1,554 ▲2821.00 ▼2.87651.44 ▼40.63142.06 ▲74.20
Media Library /wp-admin/upload.php1,411 ▲84.10 ▼0.08113.15 ▲16.5590.62 ▲44.31

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
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

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 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
Please fix the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/the-tech-tribe/public/partials/the-tribal-plugin-public-display.php
    • > /wp-content/plugins/the-tech-tribe/admin/partials/the-tribal-plugin-admin-display.php
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/the-tech-tribe/admin/partials/dashboard/settings.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/the-tech-tribe/admin/partials/dashboard/import.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/the-tech-tribe/admin/partials/alerts/alert.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function tttIsKeyActive() in wp-content/plugins/the-tech-tribe/admin/partials/dashboard/main.php:23
    • > PHP Notice
      Undefined variable: retUpdate in wp-content/plugins/the-tech-tribe/admin/partials/dashboard/main.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/the-tech-tribe/admin/partials/dashboard/api.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI found ("thetechtribe.com")
  • Screenshots: Screenshot #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Screenshots are stored in the /assets directory.) image not found
Please take inspiration from this readme.txt

the-tech-tribe/the-tribal-plugin.php 92% from 13 tests

The main PHP file in "The Tribal Plugin" ver. 1.2.2 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("the-tech-tribe.php" instead of "the-tribal-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected2,661 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
PHP436221,4022,511
JavaScript33262116
CSS301334

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity10.36
▷ Minimum class complexity1.00
▷ Maximum class complexity52.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes28
▷ Abstract classes00.00%
▷ Concrete classes28100.00%
▷ Final classes00.00%
Methods135
▷ Static methods2417.78%
▷ Public methods12592.59%
▷ Protected methods00.00%
▷ Private methods107.41%
Functions38
▷ Named functions3797.37%
▷ Anonymous functions12.63%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/dashicons/logo-white.png8.51KB0.93KB▼ 89.03%