68% bonzer-custom-fields

Code Review | Bonzer Custom Fields Creator

WordPress plugin Bonzer Custom Fields Creator scored68%from 54 tests.

About plugin

  • Plugin page: bonzer-custom-fields
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.23-6.3
  • WordPress version: 6.3.1
  • First release: Apr 17, 2018
  • Latest release: Sep 11, 2023
  • Number of updates: 23
  • Update frequency: every 85.8 days
  • Top authors: parasralhan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /984 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.53MB] [CPU: ▲4.16ms] Passed 4 tests

Server-side resources used by Bonzer Custom Fields Creator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.16 ▲0.6946.19 ▲5.15
Dashboard /wp-admin3.86 ▲0.5171.59 ▲6.45
Posts /wp-admin/edit.php3.96 ▲0.6159.97 ▲7.37
Add New Post /wp-admin/post-new.php6.38 ▲0.50100.08 ▼2.33
Media Library /wp-admin/upload.php3.75 ▲0.5249.44 ▲14.19

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 557 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Bonzer Custom Fields Creator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,044 ▲28315.26 ▲0.901.71 ▲0.0143.37 ▼0.50
Dashboard /wp-admin2,447 ▲2676.86 ▲1.21133.25 ▲48.65110.56 ▲70.46
Posts /wp-admin/edit.php2,371 ▲2713.61 ▲1.6155.12 ▲17.8683.74 ▲40.48
Add New Post /wp-admin/post-new.php1,593 ▲6723.68 ▲0.39622.84 ▼78.33193.12 ▲122.81
Media Library /wp-admin/upload.php1,486 ▲865.09 ▲0.90100.80 ▼9.6187.85 ▲39.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/bonzer-custom-fields/assets/dist/index.php
  • 105× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Less_Tree' not found in wp-content/plugins/bonzer-custom-fields/vendor/wikimedia/less.php/lib/Less/Tree/Media.php:9
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/bonzer-custom-fields/vendor/wikimedia/less.php/lib/Less/Exception/Chunk.php on line 89
    • > PHP Fatal error
      Uncaught Error: Class 'Bonzer\\Inputs\\contracts\\Input_Abstract' not found in wp-content/plugins/bonzer-custom-fields/vendor/bonzer/inputs/src/fields/Heading.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Bonzer\\Inputs\\contracts\\interfaces\\Inputs_Factory' not found in wp-content/plugins/bonzer-custom-fields/vendor/bonzer/wordpress-admin-inputs/src/contracts/interfaces/Inputs_Factory.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'BCF\\contracts\\interfaces\\Builder' not found in wp-content/plugins/bonzer-custom-fields/inc/builders/Taxonomy_Fields_Builder.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Bonzer\\IOC_Container\\facades\\Container' not found in wp-content/plugins/bonzer-custom-fields/vendor/bonzer/wordpress-admin-inputs/src/functions.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Less_VisitorReplacing' not found in wp-content/plugins/bonzer-custom-fields/vendor/wikimedia/less.php/lib/Less/Visitor/toCSS.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Bonzer\\Inputs\\contracts\\interfaces\\Auth' not found in wp-content/plugins/bonzer-custom-fields/vendor/bonzer/inputs/src/auth/Auth.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Less_Tree' not found in wp-content/plugins/bonzer-custom-fields/vendor/wikimedia/less.php/lib/Less/Tree/Url.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Less_Exception_Parser' not found in wp-content/plugins/bonzer-custom-fields/vendor/wikimedia/less.php/lib/Less/Exception/Compiler.php:9

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)
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
6 plugin tags: excellent, fields, bcf, custom fields, bonzer...

bonzer-custom-fields/bonzer-custom-fields.php 92% from 13 tests

Analyzing the main PHP file in "Bonzer Custom Fields Creator" version 1.0
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Please fix the following items
  • Do not include executable or dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/bonzer-custom-fields/vendor/bin/lessc.bat
24,829 lines of code in 223 files:
LanguageFilesBlank linesComment linesLines of code
PHP1613,5664,66712,563
CSS121051803,968
LESS212981203,671
SVG379712,842
JavaScript1030107781
Markdown51300522
JSON900466
HTML10511
DOS Batch1005

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity16.85
▷ Minimum class complexity1.00
▷ Maximum class complexity441.00
Average method complexity3.46
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces28
Interfaces14
Traits2
Classes115
▷ Abstract classes43.48%
▷ Concrete classes11196.52%
▷ Final classes00.00%
Methods881
▷ Static methods9510.78%
▷ Public methods68277.41%
▷ Protected methods9510.78%
▷ Private methods10411.80%
Functions33
▷ Named functions721.21%
▷ Anonymous functions2678.79%
Constants10
▷ Global constants660.00%
▷ Class constants440.00%
▷ Public constants4100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
506 PNG files occupy 20.18MB with 17.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/vectors/fallbacks/education/60X60/light-bulb.png14.20KB2.18KB▼ 84.66%
assets/images/vectors/fallbacks/business/100X100/crate-2.png39.28KB4.52KB▼ 88.49%
assets/images/vectors/fallbacks/education/60X60/computer-mouse.png14.20KB1.84KB▼ 87.06%
assets/images/vectors/fallbacks/business/60X60/bag.png14.20KB1.68KB▼ 88.14%
assets/images/vectors/fallbacks/education/60X60/notebook.png14.20KB2.10KB▼ 85.23%