73% debtcom-business-in-a-box

Code Review | Debt.com Business in a Box

WordPress plugin Debt.com Business in a Box scored73%from 54 tests.

About plugin

  • Plugin page: debtcom-business-...
  • Plugin version: 4.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9.5
  • WordPress version: 6.3.1
  • First release: Sep 21, 2016
  • Latest release: Apr 5, 2018
  • Number of updates: 38
  • Update frequency: every 14.8 days
  • Top authors: debtcom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,475 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.19MB] [CPU: ▲0.04ms] Passed 4 tests

Server-side resources used by Debt.com Business in a Box
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2044.88 ▲2.68
Dashboard /wp-admin3.48 ▲0.1847.76 ▼4.01
Posts /wp-admin/edit.php3.59 ▲0.2450.61 ▲3.06
Add New Post /wp-admin/post-new.php6.08 ▲0.2085.35 ▼1.57
Media Library /wp-admin/upload.php3.40 ▲0.1740.15 ▲6.79
Welcome to Meta Box /wp-admin/index.php?page=meta-box-about3.4233.27
Debt.com Settings /wp-admin/options-general.php?page=dcom_bib3.4234.97

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 296 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Debt.com Business in a Box
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5713.23 ▼1.042.07 ▲0.0242.26 ▼3.44
Dashboard /wp-admin2,218 ▲304.94 ▼0.96111.55 ▼1.9939.25 ▼3.67
Posts /wp-admin/edit.php2,101 ▲122.13 ▲0.1341.39 ▲3.1634.72 ▼0.28
Add New Post /wp-admin/post-new.php1,525 ▲1123.12 ▲5.55680.81 ▲37.7462.66 ▲1.01
Media Library /wp-admin/upload.php1,394 ▲34.43 ▲0.1897.50 ▼1.9740.81 ▼2.02
Welcome to Meta Box /wp-admin/index.php?page=meta-box-about8882.2524.0553.69
Debt.com Settings /wp-admin/options-general.php?page=dcom_bib1,4152.3156.7657.37

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 25% 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
The following issues need your attention
  • 5× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/debtcom-business-in-a-box/plugins/meta-box/inc/templates/image-advanced.php
    • > /wp-content/plugins/debtcom-business-in-a-box/plugins/meta-box/inc/templates/audio.php
    • > /wp-content/plugins/debtcom-business-in-a-box/plugins/meta-box/inc/templates/upload.php
    • > /wp-content/plugins/debtcom-business-in-a-box/plugins/meta-box/inc/templates/video.php
    • > /wp-content/plugins/debtcom-business-in-a-box/plugins/meta-box/inc/templates/media.php
  • 71× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Datetime_Field' not found in wp-content/plugins/debtcom-business-in-a-box/plugins/meta-box/inc/fields/time.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Field' not found in wp-content/plugins/debtcom-business-in-a-box/plugins/meta-box/inc/fields/choice.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Field' not found in wp-content/plugins/debtcom-business-in-a-box/plugins/meta-box/inc/fields/textarea.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Field' not found in wp-content/plugins/debtcom-business-in-a-box/plugins/meta-box/inc/fields/map.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Input_Field' not found in wp-content/plugins/debtcom-business-in-a-box/plugins/meta-box/inc/fields/checkbox.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Text_Field' not found in wp-content/plugins/debtcom-business-in-a-box/plugins/meta-box/inc/fields/color.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/debtcom-business-in-a-box/plugins/meta-box/inc/about/sections/welcome.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Field' not found in wp-content/plugins/debtcom-business-in-a-box/plugins/meta-box/inc/fields/custom-html.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Media_Field' not found in wp-content/plugins/debtcom-business-in-a-box/plugins/meta-box/inc/fields/video.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'RW_Meta_Box' not found in wp-content/plugins/debtcom-business-in-a-box/plugins/mb-settings-page/inc/class-mb-settings-page-meta-box.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=dcom_bib
    • > Network (severe)
    wp-content/plugins/debtcom-business-in-a-box/assets/banner-1544x500.jpg - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: affiliate, advertising, marketing, ads

debtcom-business-in-a-box/debtcom-business-in-a-box.php Passed 13 tests

"Debt.com Business in a Box" version 4.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
132 characters long description:
Plugin provides Business in a Box widget, and related technology to provide a one-stop solution for financial bloggers and websites.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected12,526 lines of code in 246 files:
LanguageFilesBlank linesComment linesLines of code
PHP979743,8595,297
JavaScript947081,1793,499
CSS381871181,983
PO File156086771,680
Sass114057
Markdown19010

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity7.17
▷ Minimum class complexity1.00
▷ Maximum class complexity64.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes81
▷ Abstract classes67.41%
▷ Concrete classes7592.59%
▷ Final classes00.00%
Methods381
▷ Static methods25967.98%
▷ Public methods35994.23%
▷ Protected methods225.77%
▷ Private methods00.00%
Functions42
▷ Named functions42100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
26 PNG files occupy 0.16MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
plugins/meta-box/inc/about/images/meta-box.png0.65KB0.72KB0.00%
plugins/meta-box/img/jqueryui/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%
images/powered-by-debt-com.png4.26KB4.43KB0.00%
images/comparison-configuration.png7.09KB4.07KB▼ 42.61%
plugins/meta-box/img/jqueryui/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%