72% aspose-cloud-presentation-importer

Code Review | Aspose Cloud Presentation Importer

WordPress plugin Aspose Cloud Presentation Importer scored72%from 54 tests.

About plugin

  • Plugin page: aspose-cloud-pres...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.8.1
  • WordPress version: 6.3.1
  • First release: Jan 2, 2015
  • Latest release: Apr 9, 2020
  • Number of updates: 5
  • Update frequency: every 385.4 days
  • Top authors: asposemarketplace (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

10+ active /1,127 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Aspose Cloud Presentation Importer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.83 ▲2.86
Dashboard /wp-admin3.32 ▲0.0249.31 ▼3.43
Posts /wp-admin/edit.php3.37 ▲0.0247.04 ▼2.48
Add New Post /wp-admin/post-new.php5.90 ▲0.0195.18 ▼8.78
Media Library /wp-admin/upload.php3.24 ▲0.0237.85 ▲4.05
Aspose Cloud Presentation Importer /wp-admin/options-general.php?page=AsposePptImporterAdminMenu3.2130.76

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Aspose Cloud Presentation Importer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲8813.79 ▼0.611.70 ▲0.1245.24 ▲4.59
Dashboard /wp-admin2,229 ▲415.24 ▲0.32109.85 ▲4.2244.99 ▲2.01
Posts /wp-admin/edit.php2,114 ▲252.18 ▲0.1942.21 ▲1.3731.27 ▼3.64
Add New Post /wp-admin/post-new.php1,606 ▲6322.28 ▲4.18626.22 ▲2.8048.93 ▲0.64
Media Library /wp-admin/upload.php1,411 ▲204.53 ▲0.31101.45 ▼2.0645.46 ▲2.05
Aspose Cloud Presentation Importer /wp-admin/options-general.php?page=AsposePptImporterAdminMenu9392.1933.0227.79

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/aspose-cloud-presentation-importer/getAsposePptContent.php
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined index: appSID in wp-content/plugins/aspose-cloud-presentation-importer/getAsposeFiles.php on line 29
    • > PHP Notice
      Undefined index: filename in wp-content/plugins/aspose-cloud-presentation-importer/getAsposePptContent.php on line 38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/aspose-cloud-presentation-importer/Aspose_Cloud_Presentation_Importer.php:20
    • > PHP Notice
      Undefined index: appKey in wp-content/plugins/aspose-cloud-presentation-importer/getAsposePptContent.php on line 32
    • > PHP Notice
      Undefined index: appKey in wp-content/plugins/aspose-cloud-presentation-importer/getAsposeFiles.php on line 30
    • > PHP Fatal error
      Uncaught Exception: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>IIS 10.0 Detailed Error - 404.18 - Not Found</title> <style type="text/css"> <!-- body{margin:0;font-size:.7em;font-family:Verdana,Arial,Helvetica,sans-serif;} code{margin:0;color:#006600;font-size:1.1em;font-weight:bold;} .config_source code{font-size:.8em;color:#000000;} pre{margin:0;font-size:1.4em;word-wrap:break-word;} ul,ol{margin:10px 0 10px 5px;} ul.first,ol.first{margin-top:5px;} fieldset{padding:0 15px 10px 15px;word-break:break-all;} .summary-container fieldset{padding-bottom:5px;margin-top:4px;} legend.no-expand-all{padding:2px 15px 4px 10px;margin:0 0 0 -12px;} legend{color:#333333;;margin:4px 0 8px -12px;_margin-top:0px; font-weight:bold;font-size:1em;} a:link,a:visited{color:#007EFF;font-weight:bold;} a:hover{text-decoration:none;} h1{font-size:2.4em;margin:0;color:#FFF;} h2{font-size:1.7em in wp-content/plugins/aspose-cloud-presentation-importer/Aspose_Cloud_SDK_For_PHP-master/src/Aspose/Cloud/Common/Utils.php on line 116
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aspose-cloud-presentation-importer/aspose_cloud_presentation_importer_admin.php:12
    • > PHP Notice
      Undefined index: appSID in wp-content/plugins/aspose-cloud-presentation-importer/getAsposePptContent.php on line 31

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=AsposePptImporterAdminMenu
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/aspose-cloud-presentation-importer/js/aspose_cloud_presentation_importer.js?ver=6.3.1:15:30)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=AsposePptImporterAdminMenu
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function
    • > GET request to /wp-admin/options-general.php?page=AsposePptImporterAdminMenu
    • > Network (severe)
    wp-content/plugins/aspose-cloud-presentation-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 an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Plugin configuration settings), #2 (Post Page with "Aspose Cloud Presentation Importer" button), #3 (Aspose Cloud Presentation Importer popup for selecting whether to read content from local file or aspose cloud file.)
The official readme.txt might help

aspose-cloud-presentation-importer/Aspose_Cloud_Presentation_Importer.php 92% from 13 tests

The principal PHP file in "Aspose Cloud Presentation Importer" v. 1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("aspose-cloud-presentation-importer.php" instead of "Aspose_Cloud_Presentation_Importer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin2,071 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP175446821,525
CSS12724407
JavaScript120072
Markdown125046
JSON11021

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity15.27
▷ Minimum class complexity1.00
▷ Maximum class complexity70.00
Average method complexity2.99
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods79
▷ Static methods810.13%
▷ Public methods7797.47%
▷ Protected methods00.00%
▷ Private methods22.53%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/ui-bg_glass_75_dadada_1x400.png0.31KB0.18KB▼ 39.81%
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_65_ffffff_1x400.png0.25KB0.11KB▼ 54.83%
css/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.32KB0.21KB▼ 34.34%