10% tinychat-shortcode

Code Review | Tinychat Shortcode

WordPress plugin Tinychat Shortcode scored10%from 54 tests.

About plugin

  • Plugin page: tinychat-shortcode
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-4.2.3
  • WordPress version: 6.3.1
  • First release: Nov 11, 2014
  • Latest release: Jul 31, 2015
  • Number of updates: 9
  • Update frequency: every 29.1 days
  • Top authors: datyokimphg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,218 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method tinychat_class::hook_activation() should not be called statically

Server metrics [RAM: ▼0.87MB] [CPU: ▼38.96ms] Passed 4 tests

A check of server-side resources used by Tinychat Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0534.61 ▼1.38
Dashboard /wp-admin3.09 ▼0.2622.80 ▼44.10
Posts /wp-admin/edit.php3.09 ▼0.2724.24 ▼22.16
Add New Post /wp-admin/post-new.php3.09 ▼2.8024.32 ▼76.49
Media Library /wp-admin/upload.php3.09 ▼0.1423.83 ▼13.07
Tinychat /wp-admin/admin.php?page=tiny-chat3.0923.71
Plugin Info /wp-admin/admin.php?page=tiny-chat-info3.0923.53

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
tinychat_options

Browser metrics Passed 4 tests

Tinychat Shortcode: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲2914.35 ▼0.241.63 ▼0.0447.01 ▲4.50
Dashboard /wp-admin2,221 ▲435.56 ▼0.0683.64 ▼20.6458.56 ▲18.10
Posts /wp-admin/edit.php2,126 ▲292.01 ▼0.0040.07 ▲2.5734.05 ▲2.11
Add New Post /wp-admin/post-new.php1,568 ▲4022.94 ▼0.24649.03 ▼22.21159.71 ▲96.89
Media Library /wp-admin/upload.php1,420 ▲204.16 ▼0.0794.48 ▼27.0874.22 ▲26.53
Tinychat /wp-admin/admin.php?page=tiny-chat9272.0127.2655.77
Plugin Info /wp-admin/admin.php?page=tiny-chat-info8121.9922.5527.04

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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 did not uninstall without warnings or errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method tinychat_class::menu_register() should not be called statically
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • tinychat_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tiny-chat-info
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method tinychat_class::menu_register() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tiny-chat-info
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method tinychat_class::menu_register_extras() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tiny-chat-info
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method tinychat_class::menu_styles() should not be called statically
    • > GET request to /wp-admin/admin.php?page=tiny-chat
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method tinychat_class::menu_primary() should not be called statically
    • > GET request to /wp-admin/admin.php?page=tiny-chat
    • > Deprecated in wp-content/plugins/tinychat-shortcode/tinychat.php+60
    Non-static method tinychat_class::check_post() should not be called statically
    • > GET request to /wp-admin/admin.php?page=tiny-chat
    • > Deprecated in wp-content/plugins/tinychat-shortcode/tinychat.php+61
    Non-static method tinychat_class::option_get() should not be called statically
    • > GET request to /wp-admin/admin.php?page=tiny-chat
    • > Deprecated in wp-content/plugins/tinychat-shortcode/tinychat.php+63
    Non-static method tinychat_class::form_general_options() should not be called statically
    • > GET request to /wp-admin/admin.php?page=tiny-chat
    • > Deprecated in wp-content/plugins/tinychat-shortcode/tinychat.php+66
    Non-static method tinychat_class::snippet_get_all() should not be called statically
    • > GET request to /wp-admin/admin.php?page=tiny-chat
    • > Deprecated in wp-content/plugins/tinychat-shortcode/tinychat.php+77
    Non-static method tinychat_class::form_add_snippet() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tiny-chat
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD
    • > GET request to /wp-admin/admin.php?page=tiny-chat-info
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method tinychat_class::menu_sub() should not be called statically

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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/tinychat-shortcode/information.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tinychat-shortcode/tinychat.php:464

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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:
  • Donate link: Please fix this invalid url: ""
The official readme.txt is a good inspiration

tinychat-shortcode/tinychat.php 92% from 13 tests

The principal PHP file in "Tinychat Shortcode" v. 1.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("tinychat-shortcode.php" instead of "tinychat.php")

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
Success! There were no dangerous files found in this plugin518 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22612432
CSS13186

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity39.00
▷ Minimum class complexity39.00
▷ Maximum class complexity39.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
ap.png3.61KB0.90KB▼ 75.07%