82% aspose-cloud-email-to-post

Code Review | Aspose Cloud Email to Post

WordPress plugin Aspose Cloud Email to Post scored 82% from 54 tests.

About plugin

  • Plugin page: aspose-cloud-emai...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.3
  • WordPress version: 5.8.1
  • First release: Mar 6, 2015
  • Latest release: Apr 9, 2020
  • Number of updates: 6
  • Update frequency: every 310.5 days
  • Top authors: asposemarketplace (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active / 887 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼137.91ms] Passed 4 tests

A check of server-side resources used by Aspose Cloud Email to Post
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1238.61 ▲14.14
Dashboard /wp-admin3.11 ▲0.0551.92 ▲3.81
Posts /wp-admin/edit.php3.16 ▲0.0541.52 ▼10.09
Add New Post /wp-admin/post-new.php5.47 ▲0.03100.64 ▼554.53
Media Library /wp-admin/upload.php3.05 ▲0.0535.56 ▲9.16
Aspose Cloud Email to Post /wp-admin/options-general.php?page=APCEmailToPostAdminMenu3.0227.10

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 27 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Aspose Cloud Email to Post
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,733 ▲13716.05 ▲0.468.76 ▼0.4055.26 ▲0.44
Dashboard /wp-admin2,999 ▲686.74 ▲0.77166.17 ▲11.54119.12 ▲2.06
Posts /wp-admin/edit.php2,772 ▲332.71 ▲0.0272.51 ▲3.65101.38 ▲11.12
Add New Post /wp-admin/post-new.php1,705 ▲20719.04 ▲0.24385.07 ▼7.76122.66 ▲4.02
Media Library /wp-admin/upload.php1,840 ▲335.49 ▲0.45157.48 ▲1.96130.26 ▲7.17
Aspose Cloud Email to Post /wp-admin/options-general.php?page=APCEmailToPostAdminMenu1,2552.6368.6188.86

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/aspose-cloud-email-to-post/getAsposeEmailContent.php
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined index: appKey in wp-content/plugins/aspose-cloud-email-to-post/getAsposeEmailContent.php on line 32
    • > PHP Notice
      Undefined index: filename in wp-content/plugins/aspose-cloud-email-to-post/getAsposeEmailContent.php on line 39
    • > 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-email-to-post/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-email-to-post/aspose-cloud-email-to-post-admin.php:13
    • > PHP Notice
      Undefined index: appKey in wp-content/plugins/aspose-cloud-email-to-post/getAsposeFiles.php on line 30
    • > PHP Notice
      Undefined index: appSID in wp-content/plugins/aspose-cloud-email-to-post/getAsposeEmailContent.php on line 31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/aspose-cloud-email-to-post/aspose-cloud-email-to-post.php:20
    • > PHP Notice
      Undefined index: appSID in wp-content/plugins/aspose-cloud-email-to-post/getAsposeFiles.php on line 29

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=APCEmailToPostAdminMenu
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1 1:31592 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/aspose-cloud-email-to-post/js/aspose_email_to_post.js?ver=5.8.1:15:30)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30340)" undefined
    • > GET request to /wp-admin/options-general.php?page=APCEmailToPostAdminMenu
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1 1:31702 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (Plugin configuration settings), #2 (Post Page with "Aspose Doc Importer" button), #3 (Aspose Doc Importer popup for selecting whether to read content from local file or aspose cloud file.)
The official readme.txt might help

aspose-cloud-email-to-post/aspose-cloud-email-to-post.php Passed 13 tests

Analyzing the main PHP file in "Aspose Cloud Email to Post" version 1.0
95 characters long description:
Aspose Cloud Email to Post extracts contents from the Email Body and insert it into the editor.

Code Analysis Passed 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
Success! There were no dangerous files found in this plugin1,385 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP14268334836
CSS12724404
JavaScript122078
Markdown125046
JSON11021

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity6.38
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity2.26
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods34
▷ Static methods823.53%
▷ Public methods3294.12%
▷ Protected methods00.00%
▷ Private methods25.88%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
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_e6e6e6_1x400.png0.31KB0.18KB▼ 39.81%
css/img/uploadify-cancel.png2.89KB0.21KB▼ 92.67%
css/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.32KB0.21KB▼ 34.34%
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%