88% make-invoice-generate-pay-invoice-through-api

Code Review | Make Invoice - Generate & Pay Invoice Through API

WordPress plugin Make Invoice - Generate & Pay Invoice Through API scored 88% from 54 tests.

About plugin

  • Plugin page: make-invoice-gene...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.7
  • WordPress version: 5.8.1
  • First release: May 7, 2021
  • Latest release: May 7, 2021
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: marksalvania103192 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 99 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼136.75ms] Passed 4 tests

Analyzing server-side resources used by Make Invoice - Generate & Pay Invoice Through API
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1236.09 ▲13.20
Dashboard /wp-admin3.08 ▲0.0252.41 ▲8.13
Posts /wp-admin/edit.php3.13 ▲0.0247.20 ▲4.86
Add New Post /wp-admin/post-new.php5.43 ▼0.0088.96 ▼561.65
Media Library /wp-admin/upload.php3.02 ▲0.0233.19 ▲1.67

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Make Invoice - Generate & Pay Invoice Through API: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,835 ▲23915.90 ▼0.017.97 ▼0.0853.94 ▲5.55
Dashboard /wp-admin3,100 ▲1666.24 ▲0.29141.26 ▲1.89137.58 ▲19.39
Posts /wp-admin/edit.php2,775 ▲362.70 ▲0.0166.55 ▼6.3061.64 ▼25.46
Add New Post /wp-admin/post-new.php1,722 ▲22418.76 ▼0.01361.18 ▼12.33106.46 ▼10.23
Media Library /wp-admin/upload.php1,911 ▲1045.06 ▲0.05129.69 ▼31.9799.18 ▼13.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/make-invoice-generate-pay-invoice-through-api/templates/frontend.php
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/make-invoice-generate-pay-invoice-through-api/templates/backend.php:16
    • > PHP Notice
      Undefined variable: a in wp-content/plugins/make-invoice-generate-pay-invoice-through-api/templates/frontend.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/make-invoice-generate-pay-invoice-through-api/templates/frontend.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/make-invoice-generate-pay-invoice-through-api/make-invoice-init.php:32
    • > PHP Notice
      Undefined variable: a in wp-content/plugins/make-invoice-generate-pay-invoice-through-api/templates/frontend.php on line 2
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/make-invoice-generate-pay-invoice-through-api/templates/frontend.php on line 260
    • > PHP Notice
      Undefined variable: a in wp-content/plugins/make-invoice-generate-pay-invoice-through-api/templates/frontend.php on line 260
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/make-invoice-generate-pay-invoice-through-api/templates/frontend.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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
These attributes need to be fixed:
  • Requires php: Version not formatted correctly
The official readme.txt might help

make-invoice-generate-pay-invoice-through-api/make-invoice-init.php 85% from 13 tests

The main PHP file in "Make Invoice - Generate & Pay Invoice Through API" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("make-invoice-generate-pay-invoice-through-api.php" instead of "make-invoice-init.php")
  • Description: The description should be shorter than 140 characters (currently 232 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,469 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript512824634
JSON100577
PHP451310172
CSS4171486

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin