78% pikto-chat

Code Review | Pikto Chat

WordPress plugin Pikto Chat scored78%from 54 tests.

About plugin

  • Plugin page: pikto-chat
  • Plugin version: 0.0.11
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.1-4.1
  • WordPress version: 6.3.1
  • First release: Apr 14, 2015
  • Latest release: Apr 16, 2015
  • Number of updates: 10
  • Update frequency: every 0.6 days
  • Top authors: Marko Resnik (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /823 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.08ms] Passed 4 tests

An overview of server-side resources used by Pikto Chat
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0342.61 ▲3.53
Dashboard /wp-admin3.34 ▲0.0351.82 ▼0.67
Posts /wp-admin/edit.php3.39 ▲0.0349.34 ▼3.97
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.59 ▼14.67
Media Library /wp-admin/upload.php3.26 ▲0.0336.74 ▲2.98

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 5 new files
Database: 1 new table, 7 new options
New tables
wp_piktochatmessages
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
widget_piktochat
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Pikto Chat
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.07 ▼0.191.65 ▲0.1443.36 ▼3.77
Dashboard /wp-admin2,195 ▲155.57 ▼0.1186.36 ▼1.9042.21 ▲2.11
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0035.22 ▼5.9232.75 ▼8.35
Add New Post /wp-admin/post-new.php1,528 ▼923.13 ▲4.90595.65 ▼40.1049.58 ▼26.26
Media Library /wp-admin/upload.php1,400 ▼04.21 ▲0.0496.45 ▼2.9241.63 ▲1.93

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means 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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/pikto-chat/button.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_userdata() in wp-content/plugins/pikto-chat/view.php:74
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pikto-chat/piktochat.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: im, chat, instant messages

pikto-chat/piktochat.php 85% from 13 tests

The entry point to "Pikto Chat" version 0.0.11 is a PHP file that has certain tags in its header comment area
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 ("pikto-chat.php" instead of "piktochat.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin282 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP45047282

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods450.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
PNG images were not found in this plugin