10% call-leads

Code Review | Call Leads WordPress Plugin

WordPress plugin Call Leads WordPress Plugin scored 10% from 54 tests.

About plugin

  • Plugin page: call-leads
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.2
  • WordPress version: 6.3.1
  • First release: Aug 25, 2019
  • Latest release: Sep 2, 2019
  • Number of updates: 6
  • Update frequency: every 1.7 days
  • Top authors: avadec (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 694 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/call-leads/includes/backend/CallLeads/CallLeads.php+27
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.51MB] [CPU: ▲2.18ms] Passed 4 tests

Server-side resources used by Call Leads WordPress Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.5245.39 ▼2.06
Dashboard /wp-admin3.81 ▲0.5158.79 ▲8.10
Posts /wp-admin/edit.php3.93 ▲0.5753.53 ▼3.17
Add New Post /wp-admin/post-new.php6.39 ▲0.5199.74 ▲11.98
Media Library /wp-admin/upload.php3.74 ▲0.5144.48 ▲5.86
Leads /wp-admin/edit.php?post_type=callleads3.7846.07
Settings /wp-admin/admin.php?page=calds_settings3.9745.19

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 1,325 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments
calds_admin_settings_options

Browser metrics Passed 4 tests

A check of browser resources used by Call Leads WordPress Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,951 ▲16213.84 ▼0.907.77 ▲5.6641.48 ▼1.88
Dashboard /wp-admin2,221 ▲155.84 ▼0.0796.76 ▼5.6280.57 ▲39.79
Posts /wp-admin/edit.php2,122 ▲302.03 ▲0.0634.78 ▼5.3832.74 ▼2.76
Add New Post /wp-admin/post-new.php1,572 ▲3023.91 ▲0.60676.51 ▼30.3758.41 ▼5.30
Media Library /wp-admin/upload.php1,421 ▲334.24 ▲0.02107.26 ▼3.8246.98 ▼5.09
Leads /wp-admin/edit.php?post_type=callleads1,0981.9831.8233.12
Settings /wp-admin/admin.php?page=calds_settings4,4759.46232.86148.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1256× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\InstanceContext' not found in wp-content/plugins/call-leads/vendor/twilio/sdk/Twilio/Rest/Proxy/V1/Service/ShortCodeContext.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\InstanceContext' not found in wp-content/plugins/call-leads/vendor/twilio/sdk/Twilio/Rest/IpMessaging/V2/Service/Channel/MessageContext.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\InstanceResource' not found in wp-content/plugins/call-leads/vendor/twilio/sdk/Twilio/Rest/Preview/Understand/Assistant/Intent/IntentStatisticsInstance.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\InstanceResource' not found in wp-content/plugins/call-leads/vendor/twilio/sdk/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationInstance.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\Page' not found in wp-content/plugins/call-leads/vendor/twilio/sdk/Twilio/Rest/Pricing/V1/PhoneNumberPage.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\InstanceContext' not found in wp-content/plugins/call-leads/vendor/twilio/sdk/Twilio/Rest/Chat/V2/ServiceContext.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\ListResource' not found in wp-content/plugins/call-leads/vendor/twilio/sdk/Twilio/Rest/Preview/HostedNumbers/HostedNumberOrderList.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\Page' not found in wp-content/plugins/call-leads/vendor/twilio/sdk/Twilio/Rest/IpMessaging/V2/Service/BindingPage.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\Version' not found in wp-content/plugins/call-leads/vendor/twilio/sdk/Twilio/Rest/Preview/AccSecurity.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\InstanceContext' not found in wp-content/plugins/call-leads/vendor/twilio/sdk/Twilio/Rest/Preview/Wireless/SimContext.php:25

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=calds_settings
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.defaultLabel is deprecated since version 5.5.0! Use wp.i18n instead.
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=calds_settings
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.pick is deprecated since version 5.5.0! Use wp.i18n instead.
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=calds_settings
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.clear is deprecated since version 5.5.0! Use wp.i18n instead.
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=calds_settings
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=6.3.1+1:283
    wpColorPickerL10n.clearAriaLabel is deprecated since version 5.5.0! Use wp.i18n instead.

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
You can look at the official readme.txt

call-leads/callleads.php 85% from 13 tests

This is the main PHP file of "Call Leads WordPress Plugin" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("call-leads.php" instead of "callleads.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin70,407 lines of code in 1,307 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,29818,42773,99968,547
CSS346501,665
JavaScript2161090
JSON20076
SVG18020
Dockerfile1309

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
These items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 111)
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity2.92
▷ Minimum class complexity1.00
▷ Maximum class complexity193.00
Average method complexity1.35
▷ Minimum method complexity1.00
▷ Maximum method complexity111.00
Code structure
Namespaces138
Interfaces2
Traits0
Classes1,613
▷ Abstract classes18911.72%
▷ Concrete classes1,42488.28%
▷ Final classes00.00%
Methods8,925
▷ Static methods3463.88%
▷ Public methods8,04390.12%
▷ Protected methods8769.82%
▷ Private methods60.07%
Functions85
▷ Named functions44.71%
▷ Anonymous functions8195.29%
Constants13
▷ Global constants538.46%
▷ Class constants861.54%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/just_icon.png13.46KB2.92KB▼ 78.29%
assets/img/callleads_icon.png0.41KB0.76KB0.00%
assets/img/icon_with_icon.png24.48KB6.53KB▼ 73.30%
assets/img/icon_with_image.png33.86KB8.92KB▼ 73.65%
assets/img/icon_with_text.png19.78KB4.99KB▼ 74.75%