10% duminex-invoice

Code Review | Duminex Invoice

WordPress plugin Duminex Invoice scored10%from 54 tests.

About plugin

  • Plugin page: duminex-invoice
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.2
  • WordPress version: 6.3.1
  • First release: Mar 29, 2023
  • Latest release: Apr 7, 2023
  • Number of updates: 20
  • Update frequency: every 2.9 days
  • Top authors: duminex (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /225 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • The plugin cannot be installed
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

Server metrics [RAM: ▼1.97MB] [CPU: ▼50.70ms] Passed 4 tests

This is a short check of server-side resources used by Duminex Invoice
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.448.15 ▼31.08
Dashboard /wp-admin2.05 ▼1.308.51 ▼53.35
Posts /wp-admin/edit.php2.05 ▼1.3110.22 ▼35.69
Add New Post /wp-admin/post-new.php2.05 ▼3.849.82 ▼82.69
Media Library /wp-admin/upload.php2.05 ▼1.1810.16 ▼28.38

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 10 new files
Database: 1 new table, 6 new options
New tables
wp_duminex
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Duminex Invoice
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲6714.74 ▲0.531.57 ▼0.4038.82 ▼4.19
Dashboard /wp-admin2,222 ▲345.83 ▼0.10101.14 ▼14.6369.84 ▲23.97
Posts /wp-admin/edit.php2,102 ▲131.98 ▼0.0635.84 ▲1.7132.00 ▼3.81
Add New Post /wp-admin/post-new.php1,535 ▲218.24 ▼4.88673.27 ▼2.0157.62 ▲1.80
Media Library /wp-admin/upload.php1,404 ▲164.20 ▲0.0594.12 ▼5.0366.48 ▲20.39

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_duminex
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/duminex-invoice/pages/active.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/duminex-invoice/pages/auth.php:2
    • > PHP Notice
      Undefined index: invoice-alert in wp-content/plugins/duminex-invoice/pages/alert.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_url() in wp-content/plugins/duminex-invoice/pages/invoice.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/duminex-invoice/pages/alert.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Contributors: The plugin contributors field is missing
Please take inspiration from this readme.txt

duminex-invoice/duminex-invoice.php Passed 13 tests

The principal PHP file in "Duminex Invoice" v. 1.0.0 is loaded by WordPress automatically on each request
15 characters long description:
Duminex Invoice

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
No dangerous file extensions were detected1,123 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP59822545
CSS1010378
JavaScript1310200

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.71
Average class complexity111.00
▷ Minimum class complexity111.00
▷ Maximum class complexity111.00
Average method complexity6.50
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/media/icon.png15.30KB0.55KB▼ 96.41%