71% miragetconnector

Code Review | MiragetConnector

WordPress plugin MiragetConnector scored71%from 54 tests.

About plugin

  • Plugin page: miragetconnector
  • Plugin version: 2.2.6
  • PHP compatiblity: 5.7+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.5
  • WordPress version: 6.3.1
  • First release: Oct 8, 2018
  • Latest release: Dec 25, 2020
  • Number of updates: 31
  • Update frequency: every 26.1 days
  • Top authors: amhallam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /2,217 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.18MB] [CPU: ▼4.23ms] Passed 4 tests

Analyzing server-side resources used by MiragetConnector
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1850.38 ▲11.75
Dashboard /wp-admin3.54 ▲0.2051.23 ▼9.81
Posts /wp-admin/edit.php3.60 ▲0.2450.55 ▲2.05
Add New Post /wp-admin/post-new.php6.08 ▲0.1990.98 ▼10.98
Media Library /wp-admin/upload.php3.41 ▲0.1738.21 ▲1.84
Contact Us /wp-admin/admin.php?page=miraget_contact3.3737.01
Admin Panel /wp-admin/admin.php?page=MiragetConnector_crm_plugin3.6446.67

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 55 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
recovery_mode_email_last_sent
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for MiragetConnector
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,189 ▲44313.56 ▼0.829.20 ▲7.4026.07 ▼16.37
Dashboard /wp-admin2,287 ▲1025.85 ▼0.04102.40 ▲0.9849.76 ▲6.45
Posts /wp-admin/edit.php2,173 ▲842.07 ▲0.0236.44 ▼0.8742.21 ▲6.82
Add New Post /wp-admin/post-new.php1,583 ▲6415.58 ▼7.50540.89 ▼131.31114.76 ▲62.46
Media Library /wp-admin/upload.php1,469 ▲814.25 ▼0.18101.82 ▲1.9950.52 ▲5.25
Contact Us /wp-admin/admin.php?page=miraget_contact8261.368.1032.74
Admin Panel /wp-admin/admin.php?page=MiragetConnector_crm_plugin1,5551.8829.4079.75

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • recovery_mode_email_last_sent
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=miraget_contact
    • > Error in wp-content/plugins/miragetconnector/inc/Api/Callbacks/AdminCallbacks.php+28
    Uncaught Error: Call to undefined method MiragetEmailingTemplate::render() in wp-content/plugins/miragetconnector/inc/Api/Callbacks/AdminCallbacks.php:28
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): Miraget\Api\Callbacks\AdminCallbacks->Miraget\Api\Callbacks\{closure}()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/admin.php(259): do_action()
    #4 {main}
    thrown

SRP 50% 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
Please fix the following items
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/miragetconnector/MiragetConnector.php
    • > /wp-content/plugins/miragetconnector/templates/emailing.php
    • > /wp-content/plugins/miragetconnector/templates/settings.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=miraget_contact
    • > Javascript (severe) in unknown
    /wp-content/plugins/miragetconnector/assets/js/miragetconnector.js?ver=1696988403 321:19 Uncaught TypeError: Cannot read properties of null (reading 'style')
    • > GET request to /wp-admin/admin.php?page=miraget_contact
    • > Javascript (severe) in unknown
    /wp-content/plugins/miragetconnector/assets/js/miragetconnector.js?ver=1696988403 1484:22 Uncaught ReferenceError: pluginSelectedTable is not defined
    • > GET request to /wp-admin/admin.php?page=MiragetConnector_crm_plugin
    • > Network (severe)
    wp-content/plugins/miragetconnector/assets/image/netsuit.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=MiragetConnector_crm_plugin
    • > Javascript (severe) in unknown
    /wp-content/plugins/miragetconnector/assets/js/miragetconnector.js?ver=1696988405 1487:24 Uncaught TypeError: Cannot read properties of null (reading 'length')

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% 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 require attention:
  • Screenshots: Add images for these screenshots: #1 (screenshot.png), #2 (screenshot2.png)
  • Tags: There are too many tags (29 tag instead of maximum 10)
  • Screenshots: Please describe screenshot #0 in miragetconnector/assets to your readme.txt
The official readme.txt might help

miragetconnector/MiragetConnector.php 85% from 13 tests

The principal PHP file in "MiragetConnector" v. 2.2.6 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("miragetconnector.php" instead of "MiragetConnector.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 242 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin3,402 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP235384271,745
JavaScript4273671,279
CSS14212377
JSON1001

PHP code Passed 2 tests

An short overview of 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.52
Average class complexity17.50
▷ Minimum class complexity1.00
▷ Maximum class complexity139.00
Average method complexity4.54
▷ Minimum method complexity1.00
▷ Maximum method complexity69.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes15.56%
Methods87
▷ Static methods910.34%
▷ Public methods6068.97%
▷ Protected methods00.00%
▷ Private methods2731.03%
Functions8
▷ Named functions562.50%
▷ Anonymous functions337.50%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
19 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/image/infoicon.png25.66KB10.90KB▼ 57.53%
assets/image/servicenow.png3.28KB2.03KB▼ 38.16%
assets/image/insightlys.png2.93KB1.92KB▼ 34.64%
assets/image/zendesk.png3.28KB1.88KB▼ 42.84%
assets/image/Splunk.png2.97KB1.75KB▼ 41.31%