62% inbox

Code Review | Inbox

WordPress plugin Inbox scored62%from 54 tests.

About plugin

  • Plugin page: inbox
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: Jan 11, 2019
  • Latest release: May 1, 2023
  • Number of updates: 34
  • Update frequency: every 46.2 days
  • Top authors: fahadmahmood (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /3,434 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.76MB] [CPU: ▼39.63ms] Passed 4 tests

This is a short check of server-side resources used by Inbox
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.21 ▼0.2518.79 ▼16.19
Dashboard /wp-admin3.26 ▼0.0821.14 ▼36.23
Posts /wp-admin/edit.php3.26 ▼0.0920.08 ▼25.52
Add New Post /wp-admin/post-new.php3.26 ▼2.6220.48 ▼80.57
Media Library /wp-admin/upload.php3.26 ▲0.0320.59 ▼11.44
Inbox Threads /wp-admin/admin.php?page=wp-inbox-threads3.2618.70
Inbox /wp-admin/options-general.php?page=wp_inbox3.2621.01

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Inbox
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,458 ▼28814.03 ▼0.350.51 ▼1.1118.32 ▼21.68
Dashboard /wp-admin2,199 ▲185.54 ▼0.1699.45 ▼2.6141.29 ▼1.06
Posts /wp-admin/edit.php2,104 ▲41.96 ▼0.0536.48 ▼0.5033.37 ▼3.34
Add New Post /wp-admin/post-new.php1,538 ▲718.33 ▼4.72624.94 ▼37.9171.82 ▲21.60
Media Library /wp-admin/upload.php1,407 ▲134.22 ▲0.0397.45 ▼2.3942.13 ▼0.72
Inbox Threads /wp-admin/admin.php?page=wp-inbox-threads7631.9924.5022.49
Inbox /wp-admin/options-general.php?page=wp_inbox1,3642.2343.6649.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp_inbox
    • > POST request to /wp-admin/admin-ajax.php
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.
    • > GET request to /wp-admin/options-general.php?page=wp_inbox
    • > Notice in wp-content/plugins/inbox/inc/inbox_settings.php+1039
    Undefined variable: css_arr
    • > GET request to /wp-admin/options-general.php?page=wp_inbox
    • > Warning in wp-content/plugins/inbox/inc/inbox_settings.php+1039
    implode(): Invalid arguments passed
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp_inbox
    • > POST request to /wp-admin/admin-ajax.php
    • > Error in wp-content/plugins/inbox/inc/functions.php+1050
    Uncaught Error: Call to undefined function sanitize_wpdocs_data() in wp-content/plugins/inbox/inc/functions.php:1050
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): wpinbox_update_option()
    #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-ajax.php(188): do_action()
    #4 {main}
    thrown

SRP 50% from 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
Almost there! Just fix the following items
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_permalink() in wp-content/plugins/inbox/inc/inbox_view_single_help.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/inbox/inc/inbox_settings.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_inbox_mail_notification() in wp-content/plugins/inbox/inc/inbox_view.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/inbox/templates/author.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_title() in wp-content/plugins/inbox/templates/wp_inbox_help.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_permalink() in wp-content/plugins/inbox/inc/inbox_view_single.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/inbox/inc/profiles.php:71
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/inbox/inc/inbox_admin_view.php:3

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
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp_inbox
    • > Network (severe)
    wp-admin/admin-ajax.php - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: A description for screenshot #0 is required in inbox/assets to your readme.txt
  • Screenshots: Screenshot #14 (General Settings / Live Chat) image missing
The official readme.txt might help

inbox/index.php 92% from 13 tests

Analyzing the main PHP file in "Inbox" version 1.2.0
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("inbox.php" instead of "index.php")

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
Good job! No executable or dangerous file extensions detected6,010 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP103,8182143,234
PO File34334611,015
CSS539523770
JavaScript543137703
SVG100288

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions80
▷ Named functions7796.25%
▷ Anonymous functions33.75%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.76MB with 0.36MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/banner-1.png390.24KB188.96KB▼ 51.58%
css/images/ui-icons_444444_256x240.png6.92KB4.18KB▼ 39.61%
img/banner-2.png383.75KB194.10KB▼ 49.42%