62% aspose-pdf-importer

Code Review | Aspose.PDF Importer

WordPress plugin Aspose.PDF Importer scored62%from 54 tests.

About plugin

  • Plugin page: aspose-pdf-importer
  • Plugin version: 3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Jun 17, 2014
  • Latest release: Feb 1, 2022
  • Number of updates: 51
  • Update frequency: every 54.7 days
  • Top authors: asposemarketplace (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

100+ active /14,353 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.29MB] [CPU: ▼4.59ms] Passed 4 tests

A check of server-side resources used by Aspose.PDF Importer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.76 ▼7.80
Dashboard /wp-admin3.73 ▲0.4253.12 ▲0.42
Posts /wp-admin/edit.php3.78 ▲0.4250.92 ▼4.21
Add New Post /wp-admin/post-new.php6.25 ▲0.3691.09 ▼6.76
Media Library /wp-admin/upload.php3.59 ▲0.3643.06 ▲4.71
Aspose.PDF Importer /wp-admin/options-general.php?page=AsposePdfImporterAdminMenu3.5646.81

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 735 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
aspose-cloud-activation-secret
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Aspose.PDF Importer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲5413.32 ▼1.031.84 ▼0.2643.04 ▼0.38
Dashboard /wp-admin2,249 ▲815.18 ▼0.3695.53 ▼2.0041.29 ▼2.33
Posts /wp-admin/edit.php2,156 ▲592.26 ▲0.2546.48 ▲10.8732.43 ▼2.94
Add New Post /wp-admin/post-new.php6,252 ▲4,71726.23 ▲7.91962.51 ▲308.0962.01 ▼12.27
Media Library /wp-admin/upload.php1,454 ▲604.74 ▲0.56119.91 ▲20.1551.35 ▲8.18
Aspose.PDF Importer /wp-admin/options-general.php?page=AsposePdfImporterAdminMenu9292.3242.0138.88

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • aspose-cloud-activation-secret
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/aspose-pdf-importer/getAsposePdfContent.php
  • 305× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/aspose-pdf-importer/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aspose\\Words\\Model\\LinkElement' not found in wp-content/plugins/aspose-pdf-importer/vendor/aspose-cloud/aspose-words-cloud/src/Aspose/Words/Model/TableLinkCollection.php:40
    • > PHP Fatal error
      Uncaught Error: Class 'Aspose\\Words\\Model\\WordsResponse' not found in wp-content/plugins/aspose-pdf-importer/vendor/aspose-cloud/aspose-words-cloud/src/Aspose/Words/Model/TableCellResponse.php:40
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/aspose-pdf-importer/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php:11
    • > PHP Warning
      require_once(/var/www/wordpressfeatures/bootstrap/BaseContext.php): failed to open stream: No such file or directory in wp-content/plugins/aspose-pdf-importer/vendor/aspose-cloud/aspose-words-cloud/features/bootstrap/SaveAsContext.php on line 30
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/aspose-pdf-importer/vendor/aspose-cloud/aspose-words-cloud/Examples/vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/aspose-pdf-importer/vendor/aspose-cloud/aspose-words-cloud/Examples/ConvertOtherFormatsToWord/PDFToWord/ConvertPDFToWord.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'Aspose\\Words\\Model\\LinkElement' not found in wp-content/plugins/aspose-pdf-importer/vendor/aspose-cloud/aspose-words-cloud/src/Aspose/Words/Model/TableRowFormat.php:40
    • > PHP Fatal error
      Uncaught Error: Class 'Aspose\\Tests\\BaseTestContext' not found in wp-content/plugins/aspose-pdf-importer/vendor/aspose-cloud/aspose-words-cloud/tests/Aspose/Words/Drawing/DrawingTests.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Aspose\\Tests\\BaseTestContext' not found in wp-content/plugins/aspose-pdf-importer/vendor/aspose-cloud/aspose-words-cloud/tests/Aspose/Words/Text/TextTests.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'Aspose\\Tests\\BaseTestContext' not found in wp-content/plugins/aspose-pdf-importer/vendor/aspose-cloud/aspose-words-cloud/tests/Aspose/Words/Document/DocumentStatisticsTests.php:32

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=AsposePdfImporterAdminMenu
    • > Network (severe)
    wp-content/plugins/aspose-pdf-importer/getAsposeFiles.php - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (13 tag instead of maximum 10)
The official readme.txt might help

aspose-pdf-importer/Aspose_Pdf_Importer.php 92% from 13 tests

This is the main PHP file of "Aspose.PDF Importer" version 3.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("aspose-pdf-importer.php" instead of "Aspose_Pdf_Importer.php")

Code Analysis 0% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Please fix the following items
  • Do not include executable or dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/aspose-pdf-importer/vendor/aspose-cloud/aspose-words-cloud/scripts/runBehat.bat
      • wp-content/plugins/aspose-pdf-importer/vendor/aspose-cloud/aspose-words-cloud/scripts/runCheckCodeStyle.bat
      • wp-content/plugins/aspose-pdf-importer/vendor/aspose-cloud/aspose-words-cloud/scripts/runComposer.bat
      • wp-content/plugins/aspose-pdf-importer/vendor/aspose-cloud/aspose-words-cloud/scripts/runDockerWithPhp.bat
      • wp-content/plugins/aspose-pdf-importer/vendor/aspose-cloud/aspose-words-cloud/scripts/runTests.bat
111,205 lines of code in 663 files:
LanguageFilesBlank linesComment linesLines of code
PHP60755,342132,752105,528
Markdown151,12003,466
JSON14001,048
CSS12724404
Cucumber4290198
YAML4111187
INI13341,450149
XML751109
JavaScript1192185
Dockerfile38017
make1409
DOS Batch5005

PHP code 0% from 2 tests

An overview of cyclomatic complexity and code structure
Please tend to the following items
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 9,130)
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 105)
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity21.90
▷ Minimum class complexity1.00
▷ Maximum class complexity9,130.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity105.00
Code structure
Namespaces24
Interfaces20
Traits10
Classes554
▷ Abstract classes50.90%
▷ Concrete classes54999.10%
▷ Final classes183.28%
Methods9,059
▷ Static methods1,12512.42%
▷ Public methods8,71096.15%
▷ Protected methods1902.10%
▷ Private methods1591.76%
Functions749
▷ Named functions12917.22%
▷ Anonymous functions62082.78%
Constants1,826
▷ Global constants462.52%
▷ Class constants1,78097.48%
▷ Public constants1,780100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-bg_glass_75_e6e6e6_1x400.png0.31KB0.18KB▼ 39.81%
css/images/ui-bg_flat_75_ffffff_40x100.png0.25KB0.11KB▼ 55.38%
css/images/ui-bg_glass_75_dadada_1x400.png0.31KB0.18KB▼ 39.81%
css/img/uploadify-cancel.png2.89KB0.21KB▼ 92.67%
vendor/aspose-cloud/aspose-words-cloud/TestData/Common/Aspose Logo.png8.52KB3.79KB▼ 55.56%