83% export-users-to-pdf

Code Review | Export Users To PDF

WordPress plugin Export Users To PDF scored83%from 54 tests.

About plugin

  • Plugin page: export-users-to-pdf
  • Plugin version: 1.0
  • PHP compatiblity: 7.2.29+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0
  • WordPress version: 6.3.1
  • First release: Jun 14, 2022
  • Latest release: Sep 27, 2022
  • Number of updates: 4
  • Update frequency: every 26.3 days
  • Top authors: roshanrathod0137 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /342 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Export Users To PDF
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.61 ▼7.60
Dashboard /wp-admin3.31 ▲0.0147.70 ▲1.63
Posts /wp-admin/edit.php3.36 ▲0.0054.50 ▲4.30
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.39 ▼0.47
Media Library /wp-admin/upload.php3.23 ▲0.0033.05 ▲3.08

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 283 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Export Users To PDF
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9014.74 ▲0.362.06 ▼0.3244.85 ▼1.76
Dashboard /wp-admin2,206 ▲185.91 ▲0.04110.14 ▲5.5643.63 ▲0.77
Posts /wp-admin/edit.php2,092 ▼02.05 ▼0.1151.36 ▲14.1137.88 ▲3.04
Add New Post /wp-admin/post-new.php1,542 ▲918.64 ▼4.40618.48 ▼23.1755.50 ▼1.55
Media Library /wp-admin/upload.php1,388 ▼34.21 ▲0.0195.49 ▲0.6741.66 ▲0.51

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 125× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Sabberworm\\CSS\\Property\\AtRule' not found in wp-content/plugins/export-users-to-pdf/dompdf/vendor/sabberworm/php-css-parser/src/Property/CSSNamespace.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Svg\\Tag\\Shape' not found in wp-content/plugins/export-users-to-pdf/dompdf/vendor/phenx/php-svg-lib/src/Svg/Tag/Rect.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\Renderer\\AbstractRenderer' not found in wp-content/plugins/export-users-to-pdf/dompdf/vendor/dompdf/dompdf/src/Renderer/ListBullet.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\Table\\Table' not found in wp-content/plugins/export-users-to-pdf/dompdf/vendor/phenx/php-font-lib/src/FontLib/Table/Type/post.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\Glyph\\Outline' not found in wp-content/plugins/export-users-to-pdf/dompdf/vendor/phenx/php-font-lib/src/FontLib/Glyph/OutlineComposite.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Svg\\Tag\\Shape' not found in wp-content/plugins/export-users-to-pdf/dompdf/vendor/phenx/php-svg-lib/src/Svg/Tag/Circle.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Svg\\Tag\\Shape' not found in wp-content/plugins/export-users-to-pdf/dompdf/vendor/phenx/php-svg-lib/src/Svg/Tag/Polyline.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\Renderer\\Block' not found in wp-content/plugins/export-users-to-pdf/dompdf/vendor/dompdf/dompdf/src/Renderer/Image.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\BinaryStream' not found in wp-content/plugins/export-users-to-pdf/dompdf/vendor/phenx/php-font-lib/src/FontLib/Header.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\FrameReflower\\AbstractFrameReflower' not found in wp-content/plugins/export-users-to-pdf/dompdf/vendor/dompdf/dompdf/src/FrameReflower/Table.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes: You can take inspiration from this readme.txt

export-users-to-pdf/Export-Users-To-PDF.php 92% from 13 tests

"Export Users To PDF" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("export-users-to-pdf.php" instead of "Export-Users-To-PDF.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected40,104 lines of code in 211 files:
LanguageFilesBlank linesComment linesLines of code
PHP1958,72518,04138,273
Markdown52420910
JSON600439
CSS19238391
YAML217566
HTML10017
SVG1008

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please tend to the following items
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 651)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity38.74
▷ Minimum class complexity1.00
▷ Maximum class complexity809.00
Average method complexity4.50
▷ Minimum method complexity1.00
▷ Maximum method complexity651.00
Code structure
Namespaces33
Interfaces5
Traits0
Classes177
▷ Abstract classes126.78%
▷ Concrete classes16593.22%
▷ Final classes00.00%
Methods2,034
▷ Static methods1296.34%
▷ Public methods1,71384.22%
▷ Protected methods24412.00%
▷ Private methods773.79%
Functions22
▷ Named functions418.18%
▷ Anonymous functions1881.82%
Constants205
▷ Global constants20.98%
▷ Class constants20399.02%
▷ Public constants203100.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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
dompdf/vendor/dompdf/dompdf/lib/res/broken_image.png0.60KB0.47KB▼ 22.33%