68% wpbom

Code Review | WpBom

WordPress plugin WpBom scored68%from 54 tests.

About plugin

  • Plugin page: wpbom
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Dec 20, 2021
  • Latest release: Jul 26, 2023
  • Number of updates: 10
  • Update frequency: every 58.2 days
  • Top authors: vitoranguia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,345 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.74MB] [CPU: ▼3.82ms] Passed 4 tests

An overview of server-side resources used by WpBom
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.13 ▲0.6738.98 ▼3.56
Dashboard /wp-admin4.08 ▲0.7348.85 ▼9.99
Posts /wp-admin/edit.php4.16 ▲0.8152.22 ▲7.04
Add New Post /wp-admin/post-new.php6.66 ▲0.7884.10 ▼7.92
Media Library /wp-admin/upload.php4.00 ▲0.7740.34 ▲6.18

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 466 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by WpBom
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲4514.21 ▼0.511.72 ▼0.2441.57 ▲5.27
Dashboard /wp-admin2,222 ▲425.70 ▲0.0389.42 ▲1.5939.44 ▼4.99
Posts /wp-admin/edit.php2,124 ▲452.06 ▲0.0939.40 ▲4.4335.10 ▲0.31
Add New Post /wp-admin/post-new.php1,553 ▲2723.25 ▲0.09688.87 ▲38.4153.11 ▲4.41
Media Library /wp-admin/upload.php1,424 ▲304.25 ▲0.0898.04 ▼11.2646.22 ▼0.65

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-includes/class-wp-hook.php+312
    call_user_func_array() expects parameter 1 to be a valid callback, class 'Sepbit\WpBom\Controllers\DependencyTrackController' not found
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wpbom/vendor/cmb2/cmb2/apigen/hook-docs.php
  • 57× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wpbom/vendor/cmb2/cmb2/tests/cmb-tests-base.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/wpbom/vendor/cmb2/cmb2/tests/cmb-tests-base.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/wpbom/vendor/cmb2/cmb2/includes/types/CMB2_Type_Textarea_Code.php:13
    • > PHP Warning
      file_get_contents(/Users/JT/Sites/wpengine/api/tree.html): failed to open stream: No such file or directory in wp-content/plugins/wpbom/vendor/cmb2/cmb2/apigen/hook-docs.php on line 221
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text_Date' not found in wp-content/plugins/wpbom/vendor/cmb2/cmb2/includes/types/CMB2_Type_Text_Time.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Select' not found in wp-content/plugins/wpbom/vendor/cmb2/cmb2/includes/types/CMB2_Type_Taxonomy_Select_Hierarchical.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/wpbom/vendor/cmb2/cmb2/includes/types/CMB2_Type_Taxonomy_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/wpbom/vendor/cmb2/cmb2/includes/types/CMB2_Type_Title.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/wpbom/vendor/cmb2/cmb2/includes/types/CMB2_Type_Text_Datetime_Timestamp_Timezone.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cmb2_dir() in wp-content/plugins/wpbom/vendor/cmb2/cmb2/includes/rest-api/CMB2_REST_Controller.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: bom, cyclonedx, dependency track

wpbom/wpbom.php 92% from 13 tests

The entry point to "WpBom" version 1.2.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Git Repository: There should be no Git repositories present in your plugin

Code Analysis Passed 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
Success! There were no dangerous files found in this plugin66,862 lines of code in 281 files:
LanguageFilesBlank linesComment linesLines of code
PO File12014,31518,50232,323
PHP863,3837,32512,576
JSON8006,816
CSS143571,2065,004
XML3004,505
JavaScript145317742,728
Sass17306291,411
Markdown1133501,063
Bourne Shell46745209
YAML2116193
diff216834

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity17.76
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity31.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes94
▷ Abstract classes1212.77%
▷ Concrete classes8287.23%
▷ Final classes00.00%
Methods915
▷ Static methods15316.72%
▷ Public methods77985.14%
▷ Protected methods12914.10%
▷ Private methods70.77%
Functions38
▷ Named functions3797.37%
▷ Anonymous functions12.63%
Constants16
▷ Global constants1062.50%
▷ Class constants637.50%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
22 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/cmb2/cmb2/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
vendor/cmb2/cmb2/apigen/theme-bootstrap/src/resources/sort.png0.17KB0.12KB▼ 30.41%
vendor/cmb2/cmb2/images/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
vendor/cmb2/cmb2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
vendor/cmb2/cmb2/apigen/theme-bootstrap/src/resources/tree-cleaner.png0.12KB0.08KB▼ 33.33%