78% widget-inclusion-for-manychat

Code Review | Plugin Name: ManyChat Widget Planner

WordPress plugin Plugin Name: ManyChat Widget Planner scored 78% from 54 tests.

About plugin

  • Plugin page: widget-inclusion-...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 5.8.1
  • First release: Feb 16, 2019
  • Latest release: Apr 28, 2019
  • Number of updates: 9
  • Update frequency: every 7.9 days
  • Top authors: botprophet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 3,240 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.80MB] [CPU: ▼201.34ms] Passed 4 tests

A check of server-side resources used by Plugin Name: ManyChat Widget Planner
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.78 ▲0.0628.05 ▼0.45
Dashboard /wp-admin2.85 ▼0.2021.35 ▼22.28
Posts /wp-admin/edit.php2.85 ▼0.2519.39 ▼24.45
Add New Post /wp-admin/post-new.php2.85 ▼2.5825.62 ▼744.56
Media Library /wp-admin/upload.php2.85 ▼0.1520.76 ▼14.06
ManyChat Plugin /wp-admin/options-general.php?page=bp_manychat_fields2.8523.72

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Plugin Name: ManyChat Widget Planner
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲11215.82 ▲0.239.29 ▼0.0048.07 ▼0.23
Dashboard /wp-admin2,994 ▲636.11 ▼0.06138.49 ▼17.64109.55 ▼3.73
Posts /wp-admin/edit.php2,744 ▲52.71 ▼0.0161.25 ▼8.1383.94 ▼5.42
Add New Post /wp-admin/post-new.php1,675 ▲17718.89 ▲0.04363.42 ▼20.36106.06 ▼10.20
Media Library /wp-admin/upload.php1,812 ▲55.06 ▲0.04142.38 ▼6.95115.46 ▼0.37
ManyChat Plugin /wp-admin/options-general.php?page=bp_manychat_fields1,0942.1057.5785.29

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
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/widget-inclusion-for-manychat/mc-to-wp.php+41
    date_default_timezone_set(): Timezone ID 'UTC+0' is invalid

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=bp_manychat_fields
    • > Notice in wp-content/plugins/widget-inclusion-for-manychat/mc-to-wp.php+41
    date_default_timezone_set(): Timezone ID 'UTC+0' is invalid
    • > GET request to /wp-admin/options-general.php?page=bp_manychat_fields
    • > Notice in wp-content/plugins/widget-inclusion-for-manychat/mc-to-wp.php+234
    Undefined index: default
    • > GET request to /wp-admin/options-general.php?page=bp_manychat_fields
    • > Notice in wp-content/plugins/widget-inclusion-for-manychat/mc-to-wp.php+243
    Undefined index: placeholder
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=bp_manychat_fields
    • > Notice in wp-content/plugins/widget-inclusion-for-manychat/mc-to-wp.php+272
    Undefined index: helper
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=bp_manychat_fields
    • > Notice in wp-content/plugins/widget-inclusion-for-manychat/mc-to-wp.php+266
    Undefined offset: 0
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=bp_manychat_fields
    • > Notice in wp-content/plugins/widget-inclusion-for-manychat/mc-to-wp.php+275
    Undefined index: supplimental

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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/widget-inclusion-for-manychat/mc-to-wp.php:357

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === Plugin Name: ManyChat Widget Planner === )
  • Donate link: Please fix this invalid URI: ""
Please take inspiration from this readme.txt

widget-inclusion-for-manychat/mc-to-wp.php 92% from 13 tests

This is the main PHP file of "Plugin Name: ManyChat Widget Planner" version 2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("widget-inclusion-for-manychat.php" instead of "mc-to-wp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected249 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23776249

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity15.00
▷ Minimum class complexity5.00
▷ Maximum class complexity25.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.11MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png88.27KB40.59KB▼ 54.01%
assets/icon-256x256.png19.53KB8.51KB▼ 56.41%