10% individual-item-description-and-price-for-wp-invoices

Code Review | Individual item description and price for WP Invoices

WordPress plugin Individual item description and price for WP Invoices scored 10% from 54 tests.

About plugin

  • Plugin page: individual-item-d...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2
  • WordPress version: 5.8.1
  • First release: Jan 9, 2020
  • Latest release: Jan 9, 2020
  • Number of updates: 4
  • Update frequency: every 0.5 days
  • Top authors: iflairwebtechnologies (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 262 total downloads


Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Error in wp-content/plugins/individual-item-description-and-price-for-wp-invoices/includes/class-wpinvoices_itemdescription.php+156
    Uncaught Error: Class 'WPInv_Ajax' not found in wp-content/plugins/individual-item-description-and-price-for-wp-invoices/includes/class-wpinvoices_itemdescription.php:156
    Stack trace:
    #0 wp-content/plugins/individual-item-description-and-price-for-wp-invoices/includes/class-wpinvoices_itemdescription.php(79): Wpinvoices_itemdescription->define_admin_hooks()
    #1 wp-content/plugins/individual-item-description-and-price-for-wp-invoices/wpinvoices_itemdescription.php(83): Wpinvoices_itemdescription->__construct()
    #2 wp-content/plugins/individual-item-description-and-price-for-wp-invoices/wpinvoices_itemdescription.php(87): run_wpinvoices_itemdescription()
    #3 wp-admin/includes/plugin.php(2286): include_once('/var/www/wordpr...')
    #4 wp-admin/includes/plugin.php(668): plugin_sandbox_scrape()

Server metrics [RAM: ▼0.00MB] [CPU: ▼140.86ms] Passed 4 tests

A check of server-side resources used by Individual item description and price for WP Invoices
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0037.07 ▲2.64
Dashboard /wp-admin3.06 ▲0.0045.45 ▼0.13
Posts /wp-admin/edit.php3.11 ▲0.0046.66 ▲11.27
Add New Post /wp-admin/post-new.php5.43 ▼0.0186.89 ▼565.00
Media Library /wp-admin/upload.php3.01 ▼0.0133.17 ▼0.95

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 28 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Individual item description and price for WP Invoices
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,678 ▲8215.87 ▼0.109.42 ▼1.1046.00 ▲0.11
Dashboard /wp-admin2,973 ▲435.94 ▼0.17131.48 ▼19.04114.02 ▲5.00
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0063.33 ▲2.4394.85 ▲1.61
Add New Post /wp-admin/post-new.php1,683 ▲1118.76 ▼0.06370.97 ▼12.67116.23 ▲15.08
Media Library /wp-admin/upload.php1,810 ▲35.03 ▼0.01162.13 ▲20.34118.30 ▼16.52

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/individual-item-description-and-price-for-wp-invoices/admin/templates/emails/wpinv-email-invoice-details.php
    • > /wp-content/plugins/individual-item-description-and-price-for-wp-invoices/admin/partials/wpinvoices_itemdescription-admin-display.php
    • > /wp-content/plugins/individual-item-description-and-price-for-wp-invoices/public/partials/wpinvoices_itemdescription-public-display.php
    • > /wp-content/plugins/individual-item-description-and-price-for-wp-invoices/admin/templates/emails/wpinv-email-invoice-items.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected


Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Add can add individual description and prices in invoice item), #2 (Individual description and prices in pdf inovoice), #3 (Individual description and prices in email inovoice)
The official readme.txt might help

individual-item-description-and-price-for-wp-invoices/wpinvoices_itemdescription.php 77% from 13 tests

Analyzing the main PHP file in "Individual item description and price for WP Invoices" version 1.0.0
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("individual-item-description-and-price-for-wp-invoices.php" instead of "wpinvoices_itemdescription.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 221 characters long)
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin2,038 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity23.57
▷ Minimum class complexity1.00
▷ Maximum class complexity156.00
Average method complexity5.27
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
▷ Static methods718.92%
▷ Public methods3286.49%
▷ Protected methods00.00%
▷ Private methods513.51%
▷ Named functions6100.00%
▷ Anonymous functions00.00%
▷ Global constants1100.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
There are no PNG files in this plugin