78% dial-voyants

Code Review | dial voyants

WordPress plugin dial voyants scored78%from 54 tests.

About plugin

  • Plugin page: dial-voyants
  • Plugin version: 2.9.7
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.8
  • WordPress version: 6.3.1
  • First release: Aug 10, 2020
  • Latest release: Dec 9, 2021
  • Number of updates: 103
  • Update frequency: every 4.7 days
  • Top authors: amirkacem (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,864 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.23MB] [CPU: ▲2.62ms] Passed 4 tests

Analyzing server-side resources used by dial voyants
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2047.45 ▲10.93
Dashboard /wp-admin3.61 ▲0.2659.40 ▼5.10
Posts /wp-admin/edit.php3.64 ▲0.2858.20 ▲9.83
Add New Post /wp-admin/post-new.php6.12 ▲0.2393.98 ▼1.64
Media Library /wp-admin/upload.php3.45 ▲0.2144.68 ▲7.37
Voyants Avis /wp-admin/admin.php?page=voyants-info3.43324.64
style /wp-admin/admin.php?page=style3.4445.00
Dial Voyants /wp-admin/admin.php?page=dialvoyants3.4442.71

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 47 new files
Database: 1 new table, 10 new options
New tables
wp_voyants_info
New WordPress options
theysaidso_admin_options
dv_settings_style
dialv_plugin_version
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
dv_settings
widget_theysaidso_widget
my_db_version

Browser metrics Passed 4 tests

Checking browser requirements for dial voyants
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,972 ▲22614.71 ▲0.081.69 ▲0.1143.62 ▼0.37
Dashboard /wp-admin2,381 ▲2116.39 ▲0.73109.13 ▲3.8843.00 ▲1.06
Posts /wp-admin/edit.php2,303 ▲2033.52 ▲1.5352.49 ▲11.8334.22 ▼2.75
Add New Post /wp-admin/post-new.php1,721 ▲19522.08 ▼1.45651.16 ▼44.7939.17 ▼25.25
Media Library /wp-admin/upload.php1,443 ▲434.34 ▲0.1684.08 ▼17.3843.93 ▼0.30
Voyants Avis /wp-admin/admin.php?page=voyants-info1,1343.2343.0024.32
style /wp-admin/admin.php?page=style1,4073.7077.3728.85
Dial Voyants /wp-admin/admin.php?page=dialvoyants1,2143.3839.9125.93

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • dialv_plugin_version
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • my_db_version

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=voyants-info
    • > Warning in wp-content/plugins/dial-voyants/core/dial-voyants-admin.php+388
    Invalid argument supplied for foreach()

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
Please fix the following items
  • 11× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/dial-voyants/templates/full-voyants.php:1
    • > PHP Warning
      require_once(DIALV_PLUGIN_DIR/core/DialVoyantsAvis.php): failed to open stream: No such file or directory in wp-content/plugins/dial-voyants/core/dial-voyants-admin.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/dial-voyants/templates/col-audio-voyants.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/dial-voyants/templates/sidebar-voyants.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/dial-voyants/templates/page-voyant.php:2
    • > PHP Fatal error
      require_once(): Failed opening required 'DIALV_PLUGIN_DIR/core/DialVoyantsAvis.php' (include_path='.:/usr/share/php') in wp-content/plugins/dial-voyants/core/dial-voyants-admin.php on line 2
    • > PHP Notice
      Undefined variable: avis in wp-content/plugins/dial-voyants/templates/voyant-detail.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/dial-voyants/core/inline-css.php:2
    • > PHP Warning
      Use of undefined constant DIALV_PLUGIN_DIR - assumed 'DIALV_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/dial-voyants/core/dial-voyants-admin.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/dial-voyants/templates/col-voyants.php:1

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 issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
There were not plugin tags detected

dial-voyants/dial-voyants.php 85% from 13 tests

Analyzing the main PHP file in "dial voyants" version 2.9.7
It is important to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.3" instead of "5.2")
  • Requires PHP: Required version must be the same as the one declared in readme.txt ("7.0" instead of "7.3")

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
Good job! No executable or dangerous file extensions detected2,728 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP13373291,845
CSS45825515
JavaScript47610368

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity11.75
▷ Minimum class complexity1.00
▷ Maximum class complexity31.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods33
▷ Static methods1751.52%
▷ Public methods2575.76%
▷ Protected methods00.00%
▷ Private methods824.24%
Functions25
▷ Named functions1456.00%
▷ Anonymous functions1144.00%
Constants3
▷ Global constants3100.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
19 PNG files occupy 0.48MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/num-belg.png3.95KB1.96KB▼ 50.37%
assets/images/num-canada.png4.92KB3.72KB▼ 24.50%
assets/images/forfait.png2.17KB1.11KB▼ 48.74%
assets/images/Saphir.png76.16KB41.46KB▼ 45.56%
assets/images/tel.png2.09KB1.07KB▼ 48.90%