84% gus-api-nip24pl

Code Review | NIP24 for WooCommerce

WordPress plugin NIP24 for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: gus-api-nip24pl
  • Plugin version: 1.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.9
  • WordPress version: 6.3.1
  • First release: Feb 12, 2016
  • Latest release: May 22, 2022
  • Number of updates: 14
  • Update frequency: every 163.7 days
  • Top authors: nip24.pl (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,630 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Server-side resources used by NIP24 for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.65 ▼6.47
Dashboard /wp-admin3.31 ▲0.0044.16 ▼5.21
Posts /wp-admin/edit.php3.36 ▲0.0048.57 ▲1.95
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.25 ▼3.86
Media Library /wp-admin/upload.php3.23 ▲0.0038.04 ▼0.21

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for NIP24 for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▼0.191.61 ▼0.1641.47 ▼4.49
Dashboard /wp-admin2,206 ▲185.89 ▲1.0198.00 ▼14.4438.94 ▼10.39
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0235.95 ▼2.1831.51 ▼3.21
Add New Post /wp-admin/post-new.php1,533 ▼020.90 ▼2.04680.51 ▲81.5247.90 ▼1.96
Media Library /wp-admin/upload.php1,388 ▼34.13 ▼0.27113.22 ▲11.4147.37 ▲3.05

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'NIP24\\InvoiceData' not found in wp-content/plugins/gus-api-nip24pl/NIP24/AllData.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can look at the official readme.txt

gus-api-nip24pl/gus-api-nip24pl.php Passed 13 tests

"NIP24 for WooCommerce" version 1.3.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
54 characters long description:
Plugin that integrates WooCommerce with NIP24 Service.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected1,958 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP206049641,857
PO File1222564
JavaScript171934
CSS11143

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity9.50
▷ Minimum class complexity1.00
▷ Maximum class complexity104.00
Average method complexity3.21
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes20
▷ Abstract classes15.00%
▷ Concrete classes1995.00%
▷ Final classes15.26%
Methods77
▷ Static methods1722.08%
▷ Public methods6077.92%
▷ Protected methods00.00%
▷ Private methods1722.08%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants91
▷ Global constants00.00%
▷ Class constants91100.00%
▷ Public constants91100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png28.27KB10.96KB▼ 61.23%