73% toky-click-to-call

Code Review | Toky Click To Call

WordPress plugin Toky Click To Call scored73%from 54 tests.

About plugin

  • Plugin page: toky-click-to-call
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.7
  • WordPress version: 6.3.1
  • First release: Jan 10, 2017
  • Latest release: Dec 27, 2018
  • Number of updates: 7
  • Update frequency: every 102.0 days
  • Top authors: caruizdiaz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,638 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▼0.92MB] [CPU: ▼31.35ms] Passed 4 tests

A check of server-side resources used by Toky Click To Call
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0339.97 ▲0.52
Dashboard /wp-admin3.02 ▼0.2824.49 ▼25.84
Posts /wp-admin/edit.php3.02 ▼0.3425.13 ▼20.03
Add New Post /wp-admin/post-new.php3.02 ▼2.8724.21 ▼67.85
Media Library /wp-admin/upload.php3.02 ▼0.2121.42 ▼11.66

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Toky Click To Call
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7613.55 ▼1.251.69 ▼0.0945.29 ▲2.92
Dashboard /wp-admin2,231 ▲435.89 ▲0.9899.96 ▼18.0540.03 ▼3.33
Posts /wp-admin/edit.php2,108 ▲192.02 ▼0.1138.67 ▲1.1435.96 ▲1.77
Add New Post /wp-admin/post-new.php1,548 ▲1523.51 ▲0.21676.82 ▲39.2646.82 ▼3.33
Media Library /wp-admin/upload.php1,410 ▲224.22 ▼0.0494.64 ▲0.0043.40 ▼0.69

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/toky-click-to-call/toky.php+29
    Use of undefined constant toky_render_settings_page - assumed 'toky_render_settings_page' (this will throw an Error in a future version of PHP)
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/toky-click-to-call/toky.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
The official readme.txt is a good inspiration

toky-click-to-call/toky.php 92% from 13 tests

Analyzing the main PHP file in "Toky Click To Call" version 1.0
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("toky-click-to-call.php" instead of "toky.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected359 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
CSS1340202
PHP1539157

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 2.52MB with 1.37MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/toky-icon.png1.11KB0.70KB▼ 36.99%
assets/screenshot-1.png321.71KB99.04KB▼ 69.21%
assets/screenshot-3.png2,040.46KB922.60KB▼ 54.78%
images/toky-logo.png7.51KB4.52KB▼ 39.86%
assets/screenshot-2.png213.98KB63.42KB▼ 70.36%