62% digi-bill

Code Review | Digi Bill

WordPress plugin Digi Bill scored62%from 54 tests.

About plugin

  • Plugin page: digi-bill
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 20, 2023
  • Latest release: Mar 10, 2023
  • Number of updates: 12
  • Update frequency: every 4.1 days
  • Top authors: adeonatech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /166 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼1.24MB] [CPU: ▼41.38ms] Passed 4 tests

Analyzing server-side resources used by Digi Bill
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.74 ▼0.7212.22 ▼26.84
Dashboard /wp-admin2.78 ▼0.5316.87 ▼33.63
Posts /wp-admin/edit.php2.78 ▼0.5816.07 ▼28.36
Add New Post /wp-admin/post-new.php2.78 ▼3.1115.73 ▼76.70
Media Library /wp-admin/upload.php2.78 ▼0.4514.09 ▼22.40
Login /wp-admin/admin.php?page=Digi-Bill2.7815.98
Registration /wp-admin/admin.php?page=registration2.7816.53

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: 1 new table, 6 new options
New tables
wp_digibill_plugin
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Digi Bill
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲18213.73 ▼1.025.45 ▲3.7438.57 ▼1.59
Dashboard /wp-admin2,237 ▲495.00 ▲0.07108.90 ▲8.2239.14 ▼5.07
Posts /wp-admin/edit.php2,123 ▲372.09 ▲0.0636.32 ▲1.3334.91 ▲4.52
Add New Post /wp-admin/post-new.php1,445 ▼6922.28 ▲4.75534.19 ▼161.8866.79 ▼7.19
Media Library /wp-admin/upload.php1,422 ▲374.24 ▼0.0798.98 ▼10.6238.42 ▼5.33
Login /wp-admin/admin.php?page=Digi-Bill1,0942.3633.0972.47
Registration /wp-admin/admin.php?page=registration1,0592.3632.2928.00

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 25% 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)
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=registration
    • > User notice in wp-includes/functions.php+5905
    Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/digi-bill/views/digibill-login.php
    • > /wp-content/plugins/digi-bill/views/digibill-registration.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/digi-bill/DigiBill.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% 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: Please add images for these screenshots: #1 (This is the header of the Digital bill with invoice ID, Invoice Date, Invoice Time and User Details. screenshot-1.png), #2 (This is the footer of the Digitall Bill with all the items and Totals. screenshot-2.png)
You can look at the official readme.txt

digi-bill/DigiBill.php 77% from 13 tests

"Digi Bill" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("digi-bill.php" instead of "DigiBill.php")
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.6" instead of "5.2")
  • Requires PHP: The required version number did not match the one declared in readme.txt ("5.2.4" instead of "7.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin798 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP413381517
JavaScript63142206
CSS372375

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon_digibill_20x20.png1.12KB1.10KB▼ 1.57%