83% woopop-electronic-invoice-free

Code Review | WooPop -> (Fattura Elettronica)

WordPress plugin WooPop -> (Fattura Elettronica) scored83%from 54 tests.

About plugin

  • Plugin page: woopop-electronic...
  • Plugin version: 3.3.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: May 3, 2019
  • Latest release: Nov 18, 2023
  • Number of updates: 110
  • Update frequency: every 15.1 days
  • Top authors: Picaland (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active /4,500 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼5.11ms] Passed 4 tests

A check of server-side resources used by WooPop -> (Fattura Elettronica)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.67 ▼1.70
Dashboard /wp-admin3.31 ▼0.0443.84 ▼15.42
Posts /wp-admin/edit.php3.36 ▲0.0046.92 ▼1.45
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.61 ▼1.86
Media Library /wp-admin/upload.php3.23 ▲0.0034.82 ▲3.10

Server storage [IO: ▲11.09MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 361 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WooPop -> (Fattura Elettronica)
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6814.67 ▲0.611.98 ▲0.2938.23 ▼8.01
Dashboard /wp-admin2,192 ▲125.47 ▼0.0793.91 ▲3.1636.83 ▼3.71
Posts /wp-admin/edit.php2,103 ▲31.95 ▼0.0640.04 ▲1.6536.48 ▼1.25
Add New Post /wp-admin/post-new.php1,529 ▲323.33 ▲0.17585.53 ▼27.9361.35 ▲6.93
Media Library /wp-admin/upload.php1,400 ▼34.31 ▲0.1095.33 ▲0.5242.42 ▲0.48

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

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
The following issues need your attention
  • 125× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\BinaryStream' not found in wp-content/plugins/woopop-electronic-invoice-free/vendor/phenx/php-font-lib/src/FontLib/Glyph/Outline.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Svg\\Tag\\AbstractTag' not found in wp-content/plugins/woopop-electronic-invoice-free/vendor/phenx/php-svg-lib/src/Svg/Tag/StyleTag.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\RuleSet\\RuleSet' not found in wp-content/plugins/woopop-electronic-invoice-free/vendor/sabberworm/php-css-parser/src/RuleSet/AtRuleSet.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\TrueType\\File' not found in wp-content/plugins/woopop-electronic-invoice-free/vendor/phenx/php-font-lib/src/FontLib/EOT/File.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabberworm\\CSS\\Renderable' not found in wp-content/plugins/woopop-electronic-invoice-free/vendor/sabberworm/php-css-parser/src/RuleSet/RuleSet.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Svg\\Tag\\AbstractTag' not found in wp-content/plugins/woopop-electronic-invoice-free/vendor/phenx/php-svg-lib/src/Svg/Document.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\Value\\PrimitiveValue' not found in wp-content/plugins/woopop-electronic-invoice-free/vendor/sabberworm/php-css-parser/src/Value/URL.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\Property\\Selector' not found in wp-content/plugins/woopop-electronic-invoice-free/vendor/sabberworm/php-css-parser/src/Property/KeyframeSelector.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\Glyph\\Outline' not found in wp-content/plugins/woopop-electronic-invoice-free/vendor/phenx/php-font-lib/src/FontLib/Glyph/OutlineSimple.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Svg\\Tag\\AbstractTag' not found in wp-content/plugins/woopop-electronic-invoice-free/vendor/phenx/php-svg-lib/src/Svg/Tag/ClipPath.php:13

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: fatturazione elettronica, fattura elettronica, fattura pdf, fattura xml

woopop-electronic-invoice-free/index.php 77% from 13 tests

Analyzing the main PHP file in "WooPop -> (Fattura Elettronica)" version 3.3.1
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("woopop-electronic-invoice-free.php" instead of "index.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 389 characters long)
  • Requires at least: Required version does not match the one declared in readme.txt ("4.6" instead of "4.0")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected57,698 lines of code in 286 files:
LanguageFilesBlank linesComment linesLines of code
PHP25610,65223,74549,530
XSLT1108593,178
CSS3290761,457
JavaScript81863431,186
Markdown629101,048
PO File1328436774
JSON600435
SVG20136
YAML19035
HTML10017
XML1002

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please tend to the following items
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 651)
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity41.33
▷ Minimum class complexity1.00
▷ Maximum class complexity809.00
Average method complexity4.83
▷ Minimum method complexity1.00
▷ Maximum method complexity651.00
Code structure
Namespaces45
Interfaces9
Traits0
Classes206
▷ Abstract classes136.31%
▷ Concrete classes19393.69%
▷ Final classes126.22%
Methods2,283
▷ Static methods1657.23%
▷ Public methods1,87982.30%
▷ Protected methods24710.82%
▷ Private methods1576.88%
Functions64
▷ Named functions2843.75%
▷ Anonymous functions3656.25%
Constants227
▷ Global constants114.85%
▷ Class constants21695.15%
▷ Public constants216100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/dompdf/dompdf/lib/res/broken_image.png0.60KB0.47KB▼ 22.33%
assets/images/woopop.png6.32KB2.99KB▼ 52.61%