78% webphone

Code Review | Webphone

WordPress plugin Webphone scored78%from 54 tests.

About plugin

  • Plugin page: webphone
  • Plugin version: 2.1.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Apr 14, 2015
  • Latest release: Nov 17, 2023
  • Number of updates: 47
  • Update frequency: every 66.8 days
  • Top authors: webphone (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,095 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▲0.04ms] Passed 4 tests

Server-side resources used by Webphone
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1140.35 ▲0.87
Dashboard /wp-admin3.41 ▲0.1144.08 ▼5.57
Posts /wp-admin/edit.php3.52 ▲0.1747.88 ▲3.45
Add New Post /wp-admin/post-new.php6.01 ▲0.1296.27 ▲16.76
Media Library /wp-admin/upload.php3.33 ▲0.1135.03 ▲1.43
Webphone Button /wp-admin/admin.php?page=webphone-dynamics-plugin-button3.3831.43
Webphone Dynamics /wp-admin/admin.php?page=webphone-dynamics-plugin-settings3.3230.07

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 58 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Webphone
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲8314.67 ▲0.541.64 ▼0.1739.43 ▼4.26
Dashboard /wp-admin2,235 ▲555.62 ▼0.0196.92 ▼2.3970.82 ▲25.44
Posts /wp-admin/edit.php2,158 ▲582.02 ▼0.0039.54 ▲2.3036.47 ▼1.68
Add New Post /wp-admin/post-new.php1,585 ▲5925.36 ▲1.89670.80 ▼155.4454.15 ▼4.20
Media Library /wp-admin/upload.php1,449 ▲464.21 ▲0.01101.02 ▼3.5085.02 ▲42.12
Webphone Button /wp-admin/admin.php?page=webphone-dynamics-plugin-button1,0991.8628.7443.26
Webphone Dynamics /wp-admin/admin.php?page=webphone-dynamics-plugin-settings1,3311.8228.5161.28

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 does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=webphone-dynamics-plugin-button
    • > Notice in wp-content/plugins/webphone/admin/views/admin_webphone_dynamics_button_page.php+21
    Undefined index: hf_objectidwph
    • > GET request to /wp-admin/admin.php?page=webphone-dynamics-plugin-button
    • > Notice in wp-content/plugins/webphone/admin/views/admin_webphone_dynamics_button_page.php+21
    Undefined index: hf_objectposwph
    • > GET request to /wp-admin/admin.php?page=webphone-dynamics-plugin-button
    • > Notice in wp-content/plugins/webphone/admin/views/admin_webphone_dynamics_button_page.php+21
    Undefined index: ghf_gnumber2call
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=webphone-dynamics-plugin-settings
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'wpse_edit_text' not found or invalid function name

SRP 50% 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
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/webphone/admin/partials/webphone-dynamics-admin-display.php
    • > /wp-content/plugins/webphone/public/partials/webphone-dynamics-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #5, #6, #7, #8 in webphone/assets to your readme.txt
You can look at the official readme.txt

webphone/webphone.php 92% from 13 tests

This is the main PHP file of "Webphone" version 2.1.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • 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 a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin2,236 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP15245695820
SVG433552
CSS810921505
JavaScript75195227
PO File15977131
Bourne Shell112121

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods43
▷ Static methods24.65%
▷ Public methods3786.05%
▷ Protected methods12.33%
▷ Private methods511.63%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
15 compressed PNG files occupy 0.09MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/button-page-img/glyphicons-halflings-white.png8.57KB9.20KB0.00%
admin/img/button-page-img/_footer-wph.png5.08KB3.73KB▼ 26.55%
admin/img/button-page-img/bg_radios.png1.00KB0.97KB▼ 2.75%
admin/img/button-page-img/_getid.png1.29KB1.31KB0.00%
admin/img/button-page-img/glyphicons-halflings.png12.50KB10.35KB▼ 17.19%