83% aspose-pdf-exporter

Code Review | Aspose.PDF Exporter

WordPress plugin Aspose.PDF Exporter scored83%from 54 tests.

About plugin

  • Plugin page: aspose-pdf-exporter
  • Plugin version: 3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Jul 9, 2014
  • Latest release: Feb 1, 2022
  • Number of updates: 28
  • Update frequency: every 98.8 days
  • Top authors: asposemarketplace (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

400+ active /12,808 total downloads

Benchmarks

Plugin footprint 82% 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.18MB] [CPU: ▼4.67ms] Passed 4 tests

A check of server-side resources used by Aspose.PDF Exporter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.17 ▲0.26
Dashboard /wp-admin3.69 ▲0.3854.74 ▲1.83
Posts /wp-admin/edit.php3.42 ▲0.0628.72 ▼24.06
Add New Post /wp-admin/post-new.php6.20 ▲0.3296.82 ▲7.73
Media Library /wp-admin/upload.php3.55 ▲0.3240.92 ▲3.31
Aspose.PDF Exporter /wp-admin/options-general.php?page=AsposePdfExporterAdminMenu3.5140.84

Server storage [IO: ▲8.59MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/aspose-pdf-exporter/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 833 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
aspose-cloud-activation-secret
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Aspose.PDF Exporter
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲6913.22 ▼1.151.82 ▼0.1343.36 ▲1.46
Dashboard /wp-admin2,236 ▲305.88 ▲0.99114.84 ▲0.8042.51 ▲2.18
Posts /wp-admin/edit.php2,117 ▲172.03 ▲0.0433.75 ▼6.3134.41 ▼7.86
Add New Post /wp-admin/post-new.php1,551 ▲1823.52 ▲0.38675.59 ▼27.1656.63 ▲2.27
Media Library /wp-admin/upload.php1,418 ▲184.39 ▲0.20105.36 ▼14.6848.59 ▲0.30
Aspose.PDF Exporter /wp-admin/options-general.php?page=AsposePdfExporterAdminMenu8832.0326.4835.13

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • aspose-cloud-activation-secret
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 331× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Lcobucci\\JWT\\Signer\\Ecdsa' not found in wp-content/plugins/aspose-pdf-exporter/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha256.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Aspose\\PDF\\Model\\AsposeResponse' not found in wp-content/plugins/aspose-pdf-exporter/vendor/aspose/pdf-sdk-php/src/Aspose/PDF/Model/SquareAnnotationsResponse.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/aspose-pdf-exporter/vendor/lcobucci/jwt/test/unit/ValidationDataTest.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/aspose-pdf-exporter/vendor/lcobucci/jwt/test/unit/Signer/Hmac/Sha256Test.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Aspose\\PDF\\Model\\AsposeResponse' not found in wp-content/plugins/aspose-pdf-exporter/vendor/aspose/pdf-sdk-php/src/Aspose/PDF/Model/RedactionAnnotationsResponse.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'Aspose\\PDF\\Model\\AsposeResponse' not found in wp-content/plugins/aspose-pdf-exporter/vendor/aspose/pdf-sdk-php/src/Aspose/PDF/Model/SplitResultResponse.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'Aspose\\PDF\\Model\\Annotation' not found in wp-content/plugins/aspose-pdf-exporter/vendor/aspose/pdf-sdk-php/src/Aspose/PDF/Model/PopupAnnotation.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'Aspose\\PDF\\Model\\LinkElement' not found in wp-content/plugins/aspose-pdf-exporter/vendor/aspose/pdf-sdk-php/src/Aspose/PDF/Model/Field.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'Aspose\\PDF\\Model\\LinkElement' not found in wp-content/plugins/aspose-pdf-exporter/vendor/aspose/pdf-sdk-php/src/Aspose/PDF/Model/PolygonAnnotations.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'Aspose\\PDF\\Model\\FormField' not found in wp-content/plugins/aspose-pdf-exporter/vendor/aspose/pdf-sdk-php/src/Aspose/PDF/Model/CheckBoxField.php:37

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: cloud pdf exporter, wordpress post to pdf, wordpress post content to pdf, wordpress pdf export, wordpress to pdf...

aspose-pdf-exporter/Aspose_Pdf_Exporter.php 92% from 13 tests

The main PHP file in "Aspose.PDF Exporter" ver. 3.2 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: Please rename the main PHP file in this plugin to the plugin slug ("aspose-pdf-exporter.php" instead of "Aspose_Pdf_Exporter.php")

Code Analysis 95% from 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 detected158,341 lines of code in 803 files:
LanguageFilesBlank linesComment linesLines of code
PHP48422,80082,766142,701
Markdown2984,533014,237
JSON13001,248
YAML23068
XML32065
Dockerfile18010
make1409
Bourne Shell1203

PHP code 0% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 11,882)
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity34.58
▷ Minimum class complexity1.00
▷ Maximum class complexity11,882.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces24
Interfaces21
Traits3
Classes427
▷ Abstract classes51.17%
▷ Concrete classes42298.83%
▷ Final classes204.74%
Methods7,374
▷ Static methods1,29617.58%
▷ Public methods6,83792.72%
▷ Protected methods3785.13%
▷ Private methods1592.16%
Functions1,261
▷ Named functions836.58%
▷ Anonymous functions1,17893.42%
Constants655
▷ Global constants446.72%
▷ Class constants61193.28%
▷ Public constants611100.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
No PNG files were detected