58% inbox-forms

Code Review | INBOX Forms

WordPress plugin INBOX Forms scored 58% from 54 tests.

About plugin

  • Plugin page: inbox-forms
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.2.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8
  • WordPress version: 6.3.1
  • First release: Jun 2, 2021
  • Latest release: Aug 23, 2021
  • Number of updates: 16
  • Update frequency: every 5.1 days
  • Top authors: useinbox (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 864 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.95MB] [CPU: ▼0.32ms] Passed 4 tests

A check of server-side resources used by INBOX Forms
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.00 ▲0.5442.83 ▲3.53
Dashboard /wp-admin4.42 ▲1.1149.80 ▼4.39
Posts /wp-admin/edit.php4.45 ▲1.1048.54 ▲2.04
Add New Post /wp-admin/post-new.php7.11 ▲1.2380.47 ▼2.44
Media Library /wp-admin/upload.php4.29 ▲1.0644.41 ▲9.05
Forms /wp-admin/admin.php?page=inbox-forms4.1936.54
Settings /wp-admin/admin.php?page=inbox-settings4.2237.33

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 1,227 new files
Database: 1 new table, 11 new options
New tables
wp_inbox_forms
New WordPress options
widget_recent-comments
widget_inbox_forms_widget
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
inbox_settings
ib_db_ver
db_upgraded
can_compress_scripts
ib_plugin_activated
...

Browser metrics Passed 4 tests

INBOX Forms: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,080 ▲34514.89 ▲0.3319.89 ▲18.0837.04 ▼5.57
Dashboard /wp-admin2,228 ▲404.96 ▼0.9299.77 ▼3.0580.51 ▲33.18
Posts /wp-admin/edit.php2,125 ▲362.32 ▲0.2934.72 ▼3.5433.28 ▼1.23
Add New Post /wp-admin/post-new.php6,445 ▲4,91221.06 ▼2.24979.71 ▲312.5238.45 ▼13.51
Media Library /wp-admin/upload.php1,422 ▲374.39 ▲0.18107.56 ▲10.5447.23 ▲1.30
Forms /wp-admin/admin.php?page=inbox-forms9411.9630.5028.93
Settings /wp-admin/admin.php?page=inbox-settings9411.9531.6128.30

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_inbox_forms
  • Zombie WordPress options were found after uninstall: 10 options
    • can_compress_scripts
    • widget_inbox_forms_widget
    • widget_recent-comments
    • ib_db_ver
    • ib_install_date
    • inbox_settings
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 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 0% 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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/inbox-forms/vendor/symfony/translation/Resources/bin/translation-status.php
  • 160× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/inbox-forms/vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon\\Exceptions\\InvalidArgumentException' not found in wp-content/plugins/inbox-forms/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidDateException.php:16
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/inbox-forms/src/Admin/FormsList.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Translation\\Loader\\FileLoader' not found in wp-content/plugins/inbox-forms/vendor/symfony/translation/Loader/YamlFileLoader.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Contracts\\Translation\\TranslatorInterface' not found in wp-content/plugins/inbox-forms/vendor/symfony/translation/PseudoLocalizationTranslator.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\Exception\\ExceptionInterface' not found in wp-content/plugins/inbox-forms/vendor/symfony/translation/Exception/NotFoundResourceException.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Inbox\\Repositories\\AbstractRepository' not found in wp-content/plugins/inbox-forms/src/Repositories/FormRepository.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Contracts\\Translation\\TranslatorInterface' not found in wp-content/plugins/inbox-forms/vendor/symfony/translation/DataCollectorTranslator.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon\\Exceptions\\InvalidArgumentException' not found in wp-content/plugins/inbox-forms/vendor/nesbot/carbon/src/Carbon/Exceptions/InvalidCastException.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/inbox-forms/vendor/guzzlehttp/psr7/src/LimitStream.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
6 plugin tags: form, subscribe, webform, useinbox, newsletter...

inbox-forms/inbox-form.php 85% from 13 tests

The primary PHP file in "INBOX Forms" version 1.0.4 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("inbox-forms.php" instead of "inbox-form.php")

Code Analysis 3% from 3 tests

File types 0% from 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
Please make sure to remedy the following
  • Do not distribute dangerous files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/inbox-forms/vendor/bin/carbon.bat
      • wp-content/plugins/inbox-forms/vendor/nesbot/carbon/bin/carbon.bat
59,133 lines of code in 998 files:
LanguageFilesBlank linesComment linesLines of code
PHP9238,11529,68143,619
JavaScript141,3696804,682
Markdown201,30003,863
XSD392482,803
CSS12395422,158
JSON16001,522
PO File2130150336
YAML425087
XML10046
make1409
DOS Batch2008

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 138)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity14.70
▷ Minimum class complexity1.00
▷ Maximum class complexity296.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity138.00
Code structure
Namespaces37
Interfaces43
Traits27
Classes192
▷ Abstract classes63.12%
▷ Concrete classes18696.88%
▷ Final classes2815.05%
Methods2,251
▷ Static methods50622.48%
▷ Public methods1,93886.10%
▷ Protected methods1064.71%
▷ Private methods2079.20%
Functions426
▷ Named functions12028.17%
▷ Anonymous functions30671.83%
Constants174
▷ Global constants1810.34%
▷ Class constants15689.66%
▷ Public constants15599.36%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
12 PNG files occupy 0.18MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/plugins/chosen/chosen-sprite@2x.png0.72KB0.83KB0.00%
assets/images/logo.png9.77KB4.31KB▼ 55.86%
assets/images/footer_logo.png4.85KB2.27KB▼ 53.23%
assets/images/close@2x.png2.58KB3.06KB0.00%
assets/images/video-placeholder.png1.17KB1.50KB0.00%