83% wayra-click-to-order-or-chat

Code Review | Wayra - Click to Order or Chat

WordPress plugin Wayra - Click to Order or Chat scored83%from 54 tests.

About plugin

  • Plugin page: wayra-click-to-or...
  • Plugin version: 1.0.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Oct 14, 2020
  • Latest release: Jan 23, 2022
  • Number of updates: 21
  • Update frequency: every 22.2 days
  • Top authors: wayradigital (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

5,000+ active /24,248 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.01MB] [CPU: ▼4.67ms] Passed 4 tests

Server-side resources used by Wayra - Click to Order or Chat
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0246.45 ▲4.27
Dashboard /wp-admin3.32 ▼0.0255.93 ▼10.59
Posts /wp-admin/edit.php3.37 ▲0.0248.35 ▲1.09
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.38 ▼7.57
Media Library /wp-admin/upload.php3.24 ▲0.0235.00 ▼1.61
Click to Order or Chat /wp-admin/options-general.php?page=click-order-chat3.3731.55

Server storage [IO: ▲0.36MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wayra - Click to Order or Chat
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.34 ▲0.061.63 ▼0.0249.86 ▲8.19
Dashboard /wp-admin2,200 ▲205.59 ▲0.0085.36 ▼8.2337.71 ▼7.45
Posts /wp-admin/edit.php2,111 ▲111.99 ▼0.0436.04 ▼2.0635.41 ▼2.38
Add New Post /wp-admin/post-new.php1,533 ▲723.61 ▲0.54636.31 ▼10.1754.68 ▼2.85
Media Library /wp-admin/upload.php1,408 ▲84.35 ▼0.0098.81 ▼0.4841.91 ▼5.47
Click to Order or Chat /wp-admin/options-general.php?page=click-order-chat9831.8329.8146.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wayra-click-to-order-or-chat/public/partials/click-order-chat-public-button.php:16
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wayra-click-to-order-or-chat/public/partials/click-order-chat-public-floating-button.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed: The official readme.txt is a good inspiration

wayra-click-to-order-or-chat/click-order-chat.php 85% from 13 tests

The entry point to "Wayra - Click to Order or Chat" version 1.0.8 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wayra-click-to-order-or-chat.php" instead of "click-order-chat.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 277 characters long)

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
Good job! No executable or dangerous file extensions detected3,809 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PO File129009482,921
PHP13239617702
CSS2226153
JavaScript26233

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.43
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods41
▷ Static methods24.88%
▷ Public methods3380.49%
▷ Protected methods00.00%
▷ Private methods819.51%
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

PNG files should be compressed to save space and minimize bandwidth usage
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/floating-02.png2.95KB2.33KB▼ 20.91%
admin/images/floating-01.png1.01KB1.09KB0.00%