67% bread

Code Review | bread

WordPress plugin bread scored67%from 54 tests.

About plugin

  • Plugin page: bread
  • Plugin version: 2.7.9
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.2.1
  • WordPress version: 6.3.1
  • First release: Feb 1, 2018
  • Latest release: May 28, 2023
  • Number of updates: 108
  • Update frequency: every 18.0 days
  • Top authors: radius314 (56.48%)bmltenabled (39.81%)pjaudiomv (5.56%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /10,161 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.19MB] [CPU: ▼30.28ms] Passed 4 tests

An overview of server-side resources used by bread
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.18 ▲0.7244.47 ▲6.66
Dashboard /wp-admin3.77 ▲0.4227.51 ▼38.53
Posts /wp-admin/edit.php3.77 ▲0.4128.73 ▼19.10
Add New Post /wp-admin/post-new.php3.77 ▼2.1230.85 ▼56.66
Media Library /wp-admin/upload.php3.77 ▲0.5426.74 ▼6.84

Server storage [IO: ▲27.50MB] [DB: ▲0.01MB] 67% from 3 tests

Input-output and database impact of this plugin
Please try to fix the following items
  • Try to limit filesystem usage to 25MB (currently using 27.50MB)
Filesystem: 1,014 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
bmlt_meeting_list_options
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by bread
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5914.36 ▲0.371.78 ▲0.1843.74 ▲2.42
Dashboard /wp-admin2,208 ▲275.49 ▼0.2285.79 ▼10.8338.15 ▼0.85
Posts /wp-admin/edit.php2,116 ▲162.00 ▼0.0333.94 ▼0.7834.23 ▼4.24
Add New Post /wp-admin/post-new.php1,539 ▲1323.10 ▼0.18668.53 ▼33.1552.32 ▼0.91
Media Library /wp-admin/upload.php1,416 ▲164.17 ▼0.0494.87 ▼0.3640.52 ▼2.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/bread/bmlt-meeting-list.php+2635
    Undefined index: both
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • bmlt_meeting_list_options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 fix the following items
  • 13× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/bread/partials/_front_page_setup.php
    • > /wp-content/plugins/bread/partials/_custom_section_setup.php
    • > /wp-content/plugins/bread/partials/_helpers.php
    • > /wp-content/plugins/bread/partials/_layout_setup.php
    • > /wp-content/plugins/bread/partials/_backup_restore_setup.php
    • > /wp-content/plugins/bread/bread.php
    • > /wp-content/plugins/bread/partials/_help_videos.php
    • > /wp-content/plugins/bread/partials/_bmlt_server_setup.php
    • > /wp-content/plugins/bread/partials/_meetings_setup.php
    • > /wp-content/plugins/bread/index.php
  • 235× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Barcode\\AbstractBarcode' not found in wp-content/plugins/bread/mpdf/vendor/mpdf/mpdf/src/Barcode/EanUpc.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'setasign\\Fpdi\\PdfParser\\Type\\PdfType' not found in wp-content/plugins/bread/mpdf/vendor/setasign/fpdi/src/PdfParser/Type/PdfNumeric.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\MpdfException' not found in wp-content/plugins/bread/mpdf/vendor/mpdf/mpdf/src/Http/Exception/RequestException.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\Tag' not found in wp-content/plugins/bread/mpdf/vendor/mpdf/mpdf/src/Tag/Legend.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\SubstituteTag' not found in wp-content/plugins/bread/mpdf/vendor/mpdf/mpdf/src/Tag/Ttz.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Barcode\\AbstractBarcode' not found in wp-content/plugins/bread/mpdf/vendor/mpdf/mpdf/src/Barcode/Rm4Scc.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\Tag' not found in wp-content/plugins/bread/mpdf/vendor/mpdf/mpdf/src/Tag/BlockTag.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\InlineTag' not found in wp-content/plugins/bread/mpdf/vendor/mpdf/mpdf/src/Tag/Mark.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\TTFontFile' not found in wp-content/plugins/bread/mpdf/vendor/mpdf/mpdf/src/TTFontFileAnalysis.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Mpdf\\Tag\\InlineTag' not found in wp-content/plugins/bread/mpdf/vendor/mpdf/mpdf/src/Tag/Samp.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: meeting list, na, bmlt, narcotics anonymous

bread/bmlt-meeting-list.php 92% from 13 tests

The main file in "bread" v. 2.7.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bread.php" instead of "bmlt-meeting-list.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin88,959 lines of code in 530 files:
LanguageFilesBlank linesComment linesLines of code
PHP45712,04112,95681,311
JavaScript114822373,177
CSS8104931,647
Markdown1750501,509
JSON12160806
YAML13856287
XML5150128
HTML30085
SVG3006
Bourne Shell1203

PHP code 0% from 2 tests

An overview of cyclomatic complexity and code structure
The following items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 7,021)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 460)
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity54.21
▷ Minimum class complexity1.00
▷ Maximum class complexity7,021.00
Average method complexity12.51
▷ Minimum method complexity1.00
▷ Maximum method complexity460.00
Code structure
Namespaces59
Interfaces20
Traits8
Classes317
▷ Abstract classes92.84%
▷ Concrete classes30897.16%
▷ Final classes134.22%
Methods1,675
▷ Static methods1488.84%
▷ Public methods1,46587.46%
▷ Protected methods563.34%
▷ Private methods1549.19%
Functions36
▷ Named functions822.22%
▷ Anonymous functions2877.78%
Constants435
▷ Global constants51.15%
▷ Class constants43098.85%
▷ Public constants430100.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
27 PNG files occupy 0.70MB with 0.46MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/banner_rails.png3.39KB0.14KB▼ 95.97%
mpdf/vendor/mpdf/qrcode/tests/reference/LOREM-IPSUM-2019-L-250-noborder.png183.72KB0.33KB▼ 99.82%
css/chosen-sprite.png0.53KB0.88KB0.00%
css/images/ui-bg_diagonals-thick_20_e69700_40x40.png0.41KB0.15KB▼ 62.35%
css/images/ui-bg_diagonals-small_25_c5ddfc_40x40.png0.33KB0.10KB▼ 70.47%