10% business-contact-widget

Code Review | Business Contact Widget

WordPress plugin Business Contact Widget scored 10% from 54 tests.

About plugin

  • Plugin page: business-contact-...
  • Plugin version: 2.7.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.3
  • WordPress version: 6.3.1
  • First release: Dec 2, 2012
  • Latest release: Sep 18, 2015
  • Number of updates: 37
  • Update frequency: every 27.6 days
  • Top authors: StressFree Sites (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

1,000+ active / 70,164 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/business-contact-widget/business-contact-widget.php+202
    Methods with the same name as their class will not be constructors in a future version of PHP; Business_Contact_Widget has a deprecated constructor

Server metrics [RAM: ▼1.71MB] [CPU: ▼54.94ms] Passed 4 tests

Analyzing server-side resources used by Business Contact Widget
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.27 ▼1.199.14 ▼34.09
Dashboard /wp-admin2.29 ▼1.015.96 ▼43.84
Posts /wp-admin/edit.php2.29 ▼1.066.60 ▼43.89
Add New Post /wp-admin/post-new.php2.29 ▼3.595.90 ▼97.94
Media Library /wp-admin/upload.php2.29 ▼0.945.99 ▼28.62
Business Contact Widget /wp-admin/options-general.php?page=business-contact-widget2.295.43

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 150 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
widget_business-contact-widget
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
bcw_settings

Browser metrics Passed 4 tests

Business Contact Widget: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,939 ▲20413.72 ▼0.8710.04 ▲8.1039.13 ▼9.32
Dashboard /wp-admin2,225 ▲375.79 ▲0.89112.97 ▼2.1946.54 ▲3.01
Posts /wp-admin/edit.php2,110 ▲212.01 ▼0.0337.96 ▲3.9733.29 ▲0.35
Add New Post /wp-admin/post-new.php1,541 ▲2117.69 ▼5.41673.25 ▲64.9260.87 ▲3.83
Media Library /wp-admin/upload.php1,404 ▲194.27 ▲0.09100.44 ▼1.3241.72 ▼0.94
Business Contact Widget /wp-admin/options-general.php?page=business-contact-widget1,4916.22153.7569.05

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/business-contact-widget/business-contact-widget.php+202
    Methods with the same name as their class will not be constructors in a future version of PHP; Business_Contact_Widget has a deprecated constructor
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-posts
    • widget_business-contact-widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • bcw_settings
    • db_upgraded
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=business-contact-widget
    • > Deprecated in wp-content/plugins/business-contact-widget/business-contact-widget.php+202
    Methods with the same name as their class will not be constructors in a future version of PHP; Business_Contact_Widget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=business-contact-widget
    • > Deprecated in wp-content/plugins/business-contact-widget/business-contact-widget.php+499
    Function create_function() is deprecated

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 fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/business-contact-widget/business-contact-widget.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/business-contact-widget/business-contact-widget-admin.php:45

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=business-contact-widget
    • > Javascript (severe) in unknown
    /wp-content/plugins/business-contact-widget/js/business-contact-widget-admin.min.js?ver=1.0 0:0 Uncaught ReferenceError: save is not defined
    • > GET request to /wp-admin/options-general.php?page=business-contact-widget
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/options-general.php?page=business-contact-widget
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Widget front end - company contact details.), #2 (Widget front end - company email addresses which open a new email when pressed.), #3 (Widget front end - Google map of location.), #4 (Widget front end - contact from.), #5 (Widget backend - details of widget.), #6 (Widget backend - customise the widget.), #7 (Settings backend - easily add the contact details of the company.), #8 (Settings backend - customise the styling options.)
You can look at the official readme.txt

business-contact-widget/business-contact-widget.php 92% from 13 tests

The entry point to "Business Contact Widget" version 2.7.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,869 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP29569909
PO File3206215566
CSS138499310
JavaScript4263784

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity80.00
▷ Minimum class complexity80.00
▷ Maximum class complexity80.00
Average method complexity20.75
▷ Minimum method complexity1.00
▷ Maximum method complexity74.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.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

All PNG images should be compressed to minimize bandwidth usage for end users
117 PNG files occupy 0.93MB with 0.42MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-bg_glass_50_3baae3_1x400.png0.33KB0.16KB▼ 50.89%
screenshot-4.png23.18KB6.27KB▼ 72.94%
css/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png0.30KB0.15KB▼ 50.32%
images/modern_map_grey.png0.80KB0.67KB▼ 16.28%
css/images/ui-bg_highlight-hard_95_cccccc_1x100.png0.25KB0.15KB▼ 38.49%