90% mobile-contact-bar

Code Review | Mobile Contact Bar

WordPress plugin Mobile Contact Bar scored90%from 54 tests.

About plugin

  • Plugin page: mobile-contact-bar
  • Plugin version: 2.1.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Jul 30, 2015
  • Latest release: Apr 3, 2023
  • Number of updates: 98
  • Update frequency: every 28.6 days
  • Top authors: anna.bansaghi (100%)

Code review

54 tests

User reviews

27 reviews

Install metrics

10,000+ active /110,026 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.48MB] [CPU: ▼1.90ms] Passed 4 tests

A check of server-side resources used by Mobile Contact Bar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1338.25 ▼3.39
Dashboard /wp-admin3.96 ▲0.6151.35 ▼10.27
Posts /wp-admin/edit.php4.01 ▲0.6556.44 ▲7.99
Add New Post /wp-admin/post-new.php6.48 ▲0.59100.51 ▼1.94
Media Library /wp-admin/upload.php3.82 ▲0.5942.88 ▲8.13
Mobile Contact Bar /wp-admin/options-general.php?page=mobile-contact-bar3.8244.94

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 82 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
mobile_contact_bar_version
widget_theysaidso_widget
mobile_contact_bar
can_compress_scripts

Browser metrics Passed 4 tests

Mobile Contact Bar: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲5313.30 ▼1.081.68 ▼0.1739.72 ▼4.26
Dashboard /wp-admin2,216 ▲284.85 ▼0.04108.66 ▼4.5841.25 ▲0.09
Posts /wp-admin/edit.php2,099 ▲102.03 ▲0.0339.99 ▲0.1234.11 ▼2.10
Add New Post /wp-admin/post-new.php1,537 ▲1823.11 ▼0.11593.53 ▼89.2056.46 ▼1.00
Media Library /wp-admin/upload.php1,398 ▲164.19 ▲0.0294.42 ▼7.4043.39 ▲0.16
Mobile Contact Bar /wp-admin/options-general.php?page=mobile-contact-bar3,5904.21128.3727.46

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: woocommerce cart, call to action, cta button, icon, social media

mobile-contact-bar/mobile-contact-bar.php Passed 13 tests

"Mobile Contact Bar" version 2.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
92 characters long description:
Allow your visitors to contact you via mobile phones, or access your site's pages instantly.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected21,449 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
SVG50012,314
CSS61,564455,143
PHP167116473,106
JavaScript11178110886

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity23.57
▷ Minimum class complexity1.00
▷ Maximum class complexity134.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes14100.00%
Methods98
▷ Static methods98100.00%
▷ Public methods8485.71%
▷ Protected methods00.00%
▷ Private methods1414.29%
Functions6
▷ Named functions00.00%
▷ Anonymous functions6100.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
21 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/images/ui-bg_glass_55_fbf9ee_1x400.png0.33KB0.12KB▼ 62.09%
assets/images/settings/bar/mcb-bottom-fixed-noplaceholder-nospace.png6.44KB2.93KB▼ 54.46%
assets/images/settings/bar/mcb-bottom-fixed-placeholder-nospace.png6.67KB3.01KB▼ 54.85%
assets/images/settings/bar/mcb-bottom-fixed-noplaceholder-space.png6.46KB2.93KB▼ 54.67%
assets/images/ui-bg_glass_95_fef1ec_1x400.png0.32KB0.15KB▼ 54.82%