83% textp2p-texting-widget

Code Review | TextP2P Texting Widget

WordPress plugin TextP2P Texting Widget scored 83% from 54 tests.

About plugin

  • Plugin page: textp2p-texting-w...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 18, 2019
  • Latest release: Sep 9, 2023
  • Number of updates: 20
  • Update frequency: every 71.2 days
  • Top authors: textp2p (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,156 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.18MB] [CPU: ▼11.35ms] Passed 4 tests

Server-side resources used by TextP2P Texting Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0726.31 ▼13.97
Dashboard /wp-admin3.52 ▲0.2246.85 ▼8.23
Posts /wp-admin/edit.php3.63 ▲0.2743.17 ▼3.94
Add New Post /wp-admin/post-new.php6.11 ▲0.2383.23 ▼19.24
Media Library /wp-admin/upload.php3.44 ▲0.2242.62 ▲5.30
TextP2P /wp-admin/options-general.php?page=im-textp2p3.5133.96

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
imtextp2p_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

TextP2P Texting Widget: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,943 ▲19713.95 ▼0.286.35 ▲4.7339.66 ▼0.09
Dashboard /wp-admin2,248 ▲625.23 ▲0.30103.63 ▼26.4976.25 ▲33.62
Posts /wp-admin/edit.php2,145 ▲562.35 ▲0.3435.05 ▲0.7736.97 ▲4.35
Add New Post /wp-admin/post-new.php1,721 ▲18622.57 ▼0.95641.63 ▼51.4530.71 ▼23.01
Media Library /wp-admin/upload.php1,438 ▲504.51 ▲0.2287.36 ▼12.9282.71 ▲38.94
TextP2P /wp-admin/options-general.php?page=im-textp2p3,0663.5794.3429.51

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • imtextp2p_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/textp2p-texting-widget/inc/admin/tabs/im-textp2p-general-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/textp2p-texting-widget/inc/admin/tabs/im-textp2p-gcaptcha-settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/textp2p-texting-widget/inc/im-textp2p-functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/textp2p-texting-widget/inc/admin/tabs/im-textp2p-chat-settings.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: There are too many tags (14 tag instead of maximum 10)
  • Screenshots: Add an image for screenshot #1 (Chat Box Title Style Settings.)
You can look at the official readme.txt

textp2p-texting-widget/textp2p-texting-widget.php 92% from 13 tests

The primary PHP file in "TextP2P Texting Widget" version 1.5 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin2,914 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP7256821,466
CSS3186201,205
JavaScript2517242
SVG1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions30
▷ Named functions2996.67%
▷ Anonymous functions13.33%
Constants14
▷ Global constants14100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.62MB with 0.36MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/imlogo.png15.78KB6.92KB▼ 56.13%
assets/images/chat_icons/textp2p.png46.79KB19.09KB▼ 59.20%
assets/images/pattern.png252.88KB147.09KB▼ 41.84%
assets/images/chat_icons/close_icon.png235.65KB82.82KB▼ 64.86%
assets/images/chat_icons/user_icon.png36.60KB11.54KB▼ 68.48%