66% dyn-business-panel

Code Review | Dyn Business Panel

WordPress plugin Dyn Business Panel scored66%from 54 tests.

About plugin

  • Plugin page: dyn-business-panel
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.4.2
  • WordPress version: 6.3.1
  • First release: Dec 20, 2012
  • Latest release: Dec 19, 2016
  • Number of updates: 14
  • Update frequency: every 104.9 days
  • Top authors: javotroya (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,418 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.03ms] Passed 4 tests

An overview of server-side resources used by Dyn Business Panel
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0536.45 ▼2.65
Dashboard /wp-admin3.35 ▲0.0547.17 ▼2.78
Posts /wp-admin/edit.php3.47 ▲0.1146.17 ▼5.10
Add New Post /wp-admin/post-new.php5.93 ▲0.0594.37 ▲5.51
Media Library /wp-admin/upload.php3.28 ▲0.0537.34 ▲2.41
Amigo Empresa /wp-admin/admin.php?page=amigoempresa3.2732.82
Settings /wp-admin/admin.php?page=dbp_settings3.3337.55
Products /wp-admin/admin.php?page=dbp_products3.2928.48
Clients /wp-admin/admin.php?page=dbp_clients3.2828.48
Invoices /wp-admin/admin.php?page=dbp_invoices3.2430.89

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 86 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Dyn Business Panel
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,952 ▲21713.64 ▼0.948.41 ▲6.7539.96 ▲0.16
Dashboard /wp-admin2,245 ▲605.90 ▲0.01102.68 ▼5.7040.84 ▼3.47
Posts /wp-admin/edit.php2,128 ▲392.03 ▲0.0437.35 ▼5.5940.55 ▲4.11
Add New Post /wp-admin/post-new.php1,709 ▲19024.74 ▲1.54598.75 ▼81.7673.10 ▲12.67
Media Library /wp-admin/upload.php1,430 ▲424.20 ▲0.0794.62 ▼20.2948.43 ▲0.16
Amigo Empresa /wp-admin/admin.php?page=amigoempresa1,0442.0724.4830.27
Settings /wp-admin/admin.php?page=dbp_settings1,1872.0436.5750.44
Products /wp-admin/admin.php?page=dbp_products1,1652.0527.1231.33
Clients /wp-admin/admin.php?page=dbp_clients1,0691.9526.9228.48
Invoices /wp-admin/admin.php?page=dbp_invoices1,0442.0425.3530.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dbp_invoices
    • > Notice in wp-content/plugins/dyn-business-panel/views/invoices/index.php+12
    Undefined index: post_status
    • > GET request to /wp-admin/admin.php?page=dbp_products
    • > Notice in wp-content/plugins/dyn-business-panel/views/products/index.php+2
    Undefined index: invoice
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dbp_products
    • > Warning in wp-content/plugins/dyn-business-panel/classes/products.class.php+165
    A non-numeric value encountered
    • > GET request to /wp-admin/admin.php?page=dbp_clients
    • > Notice in wp-content/plugins/dyn-business-panel/classes/clients.class.php+131
    Undefined variable: pagination_args
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dbp_clients
    • > Notice in wp-content/plugins/dyn-business-panel/classes/clients.class.php+174
    Undefined variable: defaults
    • > GET request to /wp-admin/admin.php?page=dbp_clients
    • > User deprecated in wp-includes/functions.php+5737
    Function WP_User->id was called with an argument that is deprecated since version 2.1.0! Use WP_User->ID instead.
    • > GET request to /wp-admin/admin.php?page=dbp_clients
    • > Notice in wp-content/plugins/dyn-business-panel/classes/clients.class.php+117
    Undefined index: dbp_client_phone
    • > GET request to /wp-admin/admin.php?page=dbp_clients
    • > Notice in wp-content/plugins/dyn-business-panel/classes/clients.class.php+117
    Trying to access array offset on value of type null

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/dyn-business-panel/views/import/to_pdf.php
  • 46× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/dyn-business-panel/views/template-parts/settings-company.php:30
    • > 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/dyn-business-panel/classes/invoices.class.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'dbp_products' not found in wp-content/plugins/dyn-business-panel/views/products/index.php:4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/dyn-business-panel/classes/clients.class.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_status() in wp-content/plugins/dyn-business-panel/includes/insert_payment.php:3
    • > PHP Notice
      Undefined property: stdClass::$product_price in wp-content/plugins/dyn-business-panel/includes/edit_product.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/dyn-business-panel/views/clients/index.php:1
    • > PHP Notice
      Undefined property: stdClass::$client_email in wp-content/plugins/dyn-business-panel/includes/edit_invoice.php on line 6
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/dyn-business-panel/classes/products.class.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dyn-business-panel/lib/ae_admin_menu.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=dbp_products
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=dbp_products 214:3 Uncaught TypeError: $ is not a function

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (http://dynhosting.net/wp-content/uploads/2012/12/screenshot-1.png), #2 (http://dynhosting.net/wp-content/uploads/2012/12/screenshot-2.png), #3 (http://dynhosting.net/wp-content/uploads/2012/12/screenshot-3.png)
  • Donate link: Invalid URI found ("")
You can look at the official readme.txt

dyn-business-panel/business_panel.php 92% from 13 tests

The main PHP script in "Dyn Business Panel" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("dyn-business-panel.php" instead of "business_panel.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin11,268 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
CSS10801578,160
PHP30371512,555
SVG100288
JavaScript7301265

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 complexity8.00
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods65
▷ Static methods00.00%
▷ Public methods65100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants342.86%
▷ Class constants457.14%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
32 PNG files occupy 0.12MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
skins/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
skins/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%
skins/overcast/images/ui-bg_flat_55_c0402a_40x100.png0.18KB0.08KB▼ 52.20%
skins/overcast/images/ui-icons_999999_256x240.png4.27KB4.11KB▼ 3.78%
skins/overcast/images/ui-bg_inset-soft_50_c9c9c9_1x100.png0.09KB0.16KB0.00%