72% telefonchy

Code Review | تلفنچی

WordPress plugin تلفنچی scored72%from 54 tests.

About plugin

  • Plugin page: telefonchy
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.7
  • WordPress version: 6.3.1
  • First release: Jul 16, 2021
  • Latest release: Jul 24, 2021
  • Number of updates: 6
  • Update frequency: every 1.3 days
  • Top authors: mohammadmalekirad (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,215 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.31ms] 75% from 4 tests

Analyzing server-side resources used by تلفنچی
Please fix the following
  • CPU: The total CPU usage must kept under 500.00ms (currently 1,891.51ms on /wp-admin/admin.php?page=vi-telefonchy)
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0743.08 ▲0.30
Dashboard /wp-admin3.39 ▲0.0844.75 ▼3.57
Posts /wp-admin/edit.php3.50 ▲0.1448.80 ▼2.86
Add New Post /wp-admin/post-new.php5.99 ▲0.1093.47 ▲3.54
Media Library /wp-admin/upload.php3.31 ▲0.0838.41 ▼11.10
تنظیمات /wp-admin/admin.php?page=vi-telefonchy-opt3.301,056.11
تلفنچی /wp-admin/admin.php?page=vi-telefonchy3.311,891.51

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

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

Browser metrics Passed 4 tests

A check of browser resources used by تلفنچی
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲9713.28 ▼0.981.58 ▲0.0643.56 ▲0.95
Dashboard /wp-admin2,235 ▲445.02 ▼0.84106.67 ▼1.0232.58 ▼17.92
Posts /wp-admin/edit.php2,121 ▲322.22 ▲0.2138.76 ▲0.1129.68 ▼4.45
Add New Post /wp-admin/post-new.php1,695 ▲17522.90 ▼0.53611.86 ▼102.2046.21 ▼29.66
Media Library /wp-admin/upload.php1,489 ▲1014.50 ▲0.30112.26 ▲5.7840.26 ▼2.76
تنظیمات /wp-admin/admin.php?page=vi-telefonchy-opt8501.8431.9027.76
تلفنچی /wp-admin/admin.php?page=vi-telefonchy8031.8127.2322.60

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

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
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vi-telefonchy-opt
    • > Notice in wp-content/plugins/telefonchy/views/option-panel.php+9
    Trying to access array offset on value of type bool
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vi-telefonchy
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
    Undefined offset: 0
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vi-telefonchy
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
    Trying to get property 'guid' of non-object
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vi-telefonchy
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+221
    Trying to get property 'ID' of non-object
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vi-telefonchy
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
    Trying to get property 'post_title' of non-object
    • > GET request to /wp-admin/admin.php?page=vi-telefonchy
    • > Notice in wp-content/plugins/telefonchy/views/calls-list.php+3
    Trying to access array offset on value of type null

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/telefonchy/views/calls-list.php
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'ViTelefonchy\\classes\\ViSingleton' not found in wp-content/plugins/telefonchy/classes/OptionPanel.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ViTelefonchy\\classes\\ViSingleton' not found in wp-content/plugins/telefonchy/classes/RequestHandler.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/telefonchy/views/option-panel.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ViTelefonchy\\plugin_dir_path() in wp-content/plugins/telefonchy/ViTelefonchy.php:26
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/telefonchy/views/calls-list.php on line 3
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/telefonchy/views/calls-list.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% 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:
  • Screenshots: These screenshots need descriptions #1, #2 in telefonchy/assets to your readme.txt
The official readme.txt might help

telefonchy/ViTelefonchy.php 92% from 13 tests

The main PHP script in "تلفنچی" version 1.0.5 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("telefonchy.php" instead of "ViTelefonchy.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin881 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP17188305874
JSON1005
CSS1061
JavaScript1061

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity14.25
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes8
▷ Abstract classes112.50%
▷ Concrete classes787.50%
▷ Final classes00.00%
Methods59
▷ Static methods2644.07%
▷ Public methods5491.53%
▷ Protected methods00.00%
▷ Private methods58.47%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants10
▷ Global constants440.00%
▷ Class constants660.00%
▷ Public constants233.33%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/ic.png3.68KB0.81KB▼ 77.95%