72% demetra-chat

Code Review | Demetra Chat

WordPress plugin Demetra Chat scored72%from 54 tests.

About plugin

  • Plugin page: demetra-chat
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Aug 13, 2018
  • Latest release: Aug 14, 2018
  • Number of updates: 3
  • Update frequency: every 3.7 days
  • Top authors: luc4sromano (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /563 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.77ms] Passed 4 tests

A check of server-side resources used by Demetra Chat
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.24 ▼0.23
Dashboard /wp-admin3.32 ▲0.0249.31 ▼5.16
Posts /wp-admin/edit.php3.38 ▲0.0253.68 ▲2.28
Add New Post /wp-admin/post-new.php5.92 ▲0.0485.06 ▼5.03
Media Library /wp-admin/upload.php3.25 ▲0.0236.84 ▼0.66
Demetra Chat /wp-admin/options-general.php?page=demetrachat3.2531.45

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Demetra Chat
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.34 ▼0.021.91 ▲0.2642.41 ▼1.68
Dashboard /wp-admin2,203 ▲235.56 ▼0.1193.33 ▼6.4442.68 ▼0.57
Posts /wp-admin/edit.php2,108 ▲112.02 ▲0.0240.61 ▲2.0244.66 ▲9.41
Add New Post /wp-admin/post-new.php1,533 ▲723.40 ▲0.34674.31 ▲11.4152.71 ▼1.40
Media Library /wp-admin/upload.php1,408 ▲84.19 ▼0.16108.29 ▼8.6147.30 ▼1.05
Demetra Chat /wp-admin/options-general.php?page=demetrachat8362.0325.4325.81

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

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

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=demetrachat
    • > Notice in wp-content/plugins/demetra-chat/admin/partials/demetrachat-admin-display.php+45
    Trying to access array offset on value of type bool

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/demetra-chat/public/partials/demetrachat-public-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/demetra-chat/admin/partials/demetrachat-admin-display.php:19

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Demetra Chat) image missing
You can take inspiration from this readme.txt

demetra-chat/demetrachat.php 85% from 13 tests

The main PHP file in "Demetra Chat" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("demetra-chat.php" instead of "demetrachat.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 glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected257 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12132527251
JavaScript24546
CSS2080

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity1.86
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.21
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin