52% voip-call-charges-lite

Code Review | Voip Call Charges Lite

WordPress plugin Voip Call Charges Lite scored52%from 54 tests.

About plugin

  • Plugin page: voip-call-charges...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Jun 22, 2014
  • Latest release: Jun 23, 2014
  • Number of updates: 16
  • Update frequency: every 0.1 days
  • Top authors: vnbenny (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,289 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.77MB] [CPU: ▼33.55ms] Passed 4 tests

A check of server-side resources used by Voip Call Charges Lite
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0325.67 ▼15.50
Dashboard /wp-admin3.18 ▼0.1327.75 ▼30.05
Posts /wp-admin/edit.php3.18 ▼0.1830.37 ▼17.47
Add New Post /wp-admin/post-new.php3.18 ▼2.7128.68 ▼71.18
Media Library /wp-admin/upload.php3.18 ▼0.0525.54 ▼11.34
Voip Call Charges /wp-admin/admin.php?page=voip-call-charges3.1828.21
Voip Call Charges import /wp-admin/admin.php?page=voip-call-charges-import3.1828.97
Edit charge /wp-admin/options-writing.php?page=voip-call-charges-edit3.2027.45
New charge /wp-admin/options-writing.php?page=voip-call-charges-new3.2026.50
Voip settings /wp-admin/admin.php?page=voip-call-charges-settings3.1825.30

Server storage [IO: ▲0.05MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
The plugin installed successfully
Filesystem: 6 new files
Database: 2 new tables, 7 new options
New tables
wp_voip_charges
wp_voip_countries
New WordPress options
widget_theysaidso_widget
widget_voip_call_charges_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Voip Call Charges Lite
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,862 ▲10513.24 ▼1.041.87 ▼0.2738.38 ▼6.29
Dashboard /wp-admin2,242 ▲515.83 ▲0.8397.39 ▼8.9247.64 ▲2.87
Posts /wp-admin/edit.php2,128 ▲391.99 ▼0.0139.87 ▲3.9950.16 ▲16.18
Add New Post /wp-admin/post-new.php1,393 ▼13517.29 ▼1.08534.62 ▼104.5966.39 ▲7.11
Media Library /wp-admin/upload.php1,424 ▲334.08 ▼0.1499.92 ▲0.3953.14 ▲10.46
Voip Call Charges /wp-admin/admin.php?page=voip-call-charges8702.0223.8034.44
Voip Call Charges import /wp-admin/admin.php?page=voip-call-charges-import8622.0525.7543.02
Edit charge /wp-admin/options-writing.php?page=voip-call-charges-edit370.440.1111.62
New charge /wp-admin/options-writing.php?page=voip-call-charges-new370.440.0710.73
Voip settings /wp-admin/admin.php?page=voip-call-charges-settings9432.1523.3742.13

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Voipcallcharges_Admin::admin_menu() should not be called statically
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_voip_countries
    • wp_voip_charges
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_voip_call_charges_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=voip-call-charges-settings
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Voipcallcharges_Admin::admin_menu() should not be called statically
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=voip-call-charges-settings
    • > User deprecated in wp-includes/functions.php+5453
    Function add_utility_page is deprecated since version 4.5.0! Use add_menu_page() instead.
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=voip-call-charges-settings
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Voipcallcharges_Admin::register_admin_settings() should not be called statically
  • 15 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=voip-call-charges-settings
    • > Warning in wp-includes/option.php+1172
    Cannot modify header information - headers already sent by (output started at wp-includes/class-wpdb.php:1894)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=voip-call-charges-settings
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Voipcallcharges_Admin::css() should not be called statically
    • > GET request to /wp-admin/admin.php?page=voip-call-charges
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Voipcallcharges_Admin::myCharges() should not be called statically
    • > GET request to /wp-admin/admin.php?page=voip-call-charges-import
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Voipcallcharges_Admin::doImport() should not be called statically
    • > GET request to /wp-admin/admin.php?page=voip-call-charges-settings
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method Voipcallcharges_Admin::settings() should not be called statically

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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/voip-call-charges-lite/Voip-call-charges-lite.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/voip-call-charges-lite/class.voipcallcharges_widget.php:5

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
  • Plugin Name: You should set the name of your plugin on the first line ( === voip-call-charges-lite === )
You can take inspiration from this readme.txt

voip-call-charges-lite/Voip-call-charges-lite.php 92% from 13 tests

Analyzing the main PHP file in "Voip Call Charges Lite" 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 ("voip-call-charges-lite.php" instead of "Voip-call-charges-lite.php")

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 plugin1,097 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP387351,097

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity20.50
▷ Minimum class complexity5.00
▷ Maximum class complexity36.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods213.33%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
search.png1.70KB0.59KB▼ 65.35%
search-country.png1.90KB0.67KB▼ 64.58%