81% groupdocs-documents-annotation

Code Review | GroupDocs.Annotation for Cloud

WordPress plugin GroupDocs.Annotation for Cloud scored 81% from 54 tests.

About plugin

  • Plugin page: groupdocs-documen...
  • Plugin version: 1.3.13
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.0
  • WordPress version: 5.9.2
  • First release: Oct 25, 2012
  • Latest release: Mar 29, 2015
  • Number of updates: 174
  • Update frequency: every 5.2 days
  • Top authors: groupdocs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active / 15,290 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼289.01ms] Passed 4 tests

Server-side resources used by GroupDocs.Annotation for Cloud
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0463.51 ▲5.84
Dashboard /wp-admin3.45 ▲0.0436.22 ▲1.86
Posts /wp-admin/edit.php3.68 ▲0.0452.75 ▲13.08
Add New Post /wp-admin/post-new.php6.92 ▼0.0599.21 ▼1,165.37
Media Library /wp-admin/upload.php3.33 ▲0.0425.59 ▲1.63

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for GroupDocs.Annotation for Cloud
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,790 ▲6815.13 ▼0.576.20 ▲0.231.91 ▼1.01
Dashboard /wp-admin2,893 ▲326.00 ▼0.26117.78 ▼11.91187.87 ▲6.14
Posts /wp-admin/edit.php2,693 ▲53.23 ▲0.0062.18 ▼1.74137.00 ▼1.45
Add New Post /wp-admin/post-new.php1,660 ▼116.08 ▼0.13417.12 ▼2.58202.78 ▲45.01
Media Library /wp-admin/upload.php1,703 ▲115.53 ▲0.03139.38 ▼3.51263.79 ▲16.65
GroupDocs Annotation /wp-admin/grpdocsannotation.php260.940.0320.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

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
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
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/groupdocs-documents-annotation/tree_annotation/treeannotation.php
    • > /wp-content/plugins/groupdocs-documents-annotation/grpdocs-dialog.php
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/groupdocs-documents-annotation/grpdocs-functions.php on line 3
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/groupdocs-documents-annotation/grpdocs-functions.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/groupdocs-documents-annotation/grpdocsannotation.php:124
    • > PHP Fatal error
      Uncaught Error: Interface 'RequestSigner' not found in wp-content/plugins/groupdocs-documents-annotation/tree_annotation/lib/groupdocs-php/GroupDocsRequestSigner.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/groupdocs-documents-annotation/options.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/grpdocsannotation.php
    • > Network (severe)
    wp-admin/grpdocsannotation.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (Here's a screenshot of how to get your document link for insertion into the GroupDocs.Annotation for Cloud dialog), #2 (Here's a screenshot of the GroupDocs.Annotation for Cloud in a Wordpress blog (with Polyline annotation)), #3 (Here's a screenshot of the GroupDocs.Annotation for Cloud in a Wordpress blog (with Point annotation)), #4 (Here's a screenshot of the GroupDocs.Annotation for Cloud in a Wordpress admin panel)
Please take inspiration from this readme.txt

groupdocs-documents-annotation/grpdocsannotation.php 85% from 13 tests

This is the main PHP file of "GroupDocs.Annotation for Cloud" version 1.3.13, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 247 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("groupdocs-documents-annotation.php" instead of "grpdocsannotation.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected19,111 lines of code in 509 files:
LanguageFilesBlank linesComment linesLines of code
PHP4993,63613,61318,292
JavaScript7139240626
CSS272150
JSON10043

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 1,024)
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity5.86
▷ Minimum class complexity1.00
▷ Maximum class complexity1,024.00
Average method complexity7.14
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes495
▷ Abstract classes00.00%
▷ Concrete classes495100.00%
▷ Final classes00.00%
Methods396
▷ Static methods246.06%
▷ Public methods39499.49%
▷ Protected methods00.00%
▷ Private methods20.51%
Functions12
▷ Named functions1191.67%
▷ Anonymous functions18.33%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
29 PNG files occupy 0.56MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
tree_annotation/lib/jquery_file_tree/images/ruby.png0.61KB0.65KB0.00%
screenshot-3.png168.50KB59.54KB▼ 64.66%
tree_annotation/lib/jquery_file_tree/images/doc.png0.64KB0.70KB0.00%
tree_annotation/lib/jquery_file_tree/images/application.png0.45KB0.52KB0.00%
screenshot-2.png168.84KB60.98KB▼ 63.88%