89% obox-intercom

Code Review | Intercom Integration for WordPress

WordPress plugin Intercom Integration for WordPress scored89%from 54 tests.

About plugin

  • Plugin page: obox-intercom
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.3
  • WordPress version: 6.3.1
  • First release: Sep 22, 2015
  • Latest release: Jan 21, 2016
  • Number of updates: 14
  • Update frequency: every 8.7 days
  • Top authors: obox (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

20+ active /1,881 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼0.64ms] Passed 4 tests

Analyzing server-side resources used by Intercom Integration for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1142.00 ▼0.43
Dashboard /wp-admin3.41 ▲0.1147.83 ▼2.53
Posts /wp-admin/edit.php3.53 ▲0.1754.39 ▲3.55
Add New Post /wp-admin/post-new.php5.99 ▲0.1197.12 ▼1.03
Media Library /wp-admin/upload.php3.33 ▲0.1139.72 ▲1.44
Intercom /wp-admin/options-general.php?page=intercom-wp3.3033.87

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Intercom Integration for WordPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲4914.36 ▲0.001.72 ▼0.0243.86 ▼0.29
Dashboard /wp-admin2,213 ▲365.64 ▲0.0589.61 ▼16.0740.77 ▼2.75
Posts /wp-admin/edit.php2,122 ▲192.10 ▲0.0941.55 ▼0.9836.32 ▼1.66
Add New Post /wp-admin/post-new.php1,541 ▲1523.72 ▲0.48692.45 ▲40.5453.18 ▼0.47
Media Library /wp-admin/upload.php1,415 ▲154.30 ▲0.15100.90 ▼6.7246.44 ▼2.45
Intercom /wp-admin/options-general.php?page=intercom-wp9892.0128.4433.12

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% 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
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (Launchpad Activated), #2 (General Settings), #3 (Control the look and feel)
The official readme.txt is a good inspiration

obox-intercom/index.php 77% from 13 tests

The primary PHP file in "Intercom Integration for WordPress" version 1.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages/")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("obox-intercom.php" instead of "index.php")
  • Text Domain: The text domain should only use lowercase characters and dashes

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
There were no executable files found in this plugin670 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2195111497
CSS11022163
JavaScript241410

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity46.50
▷ Minimum class complexity27.00
▷ Maximum class complexity66.00
Average method complexity5.55
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods15.00%
▷ Public methods1995.00%
▷ Protected methods00.00%
▷ Private methods15.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/cross.png0.28KB0.17KB▼ 41.52%
assets/images/intercom-logo-huge.png23.06KB7.31KB▼ 68.30%
assets/images/tick.png0.34KB0.22KB▼ 35.65%
assets/images/intercom-logo-small.png23.15KB7.21KB▼ 68.84%