83% embed-docs

Code Review | Embed Docs - Elementor Files Addon,Elementor Docs Addon,Embed PDF, Word, PowerPoint and Excel Files in Gutenberg & Elementor

WordPress plugin Embed Docs - Elementor Files Addon,Elementor Docs Addon,Embed PDF, Word, PowerPoint and Excel Files in Gutenberg & Elementor scored83%from 54 tests.

About plugin

  • Plugin page: embed-docs
  • Plugin version: 3.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1
  • WordPress version: 6.3.1
  • First release: Jul 28, 2022
  • Latest release: Nov 11, 2022
  • Number of updates: 92
  • Update frequency: every 1.2 days
  • Top authors: a1office (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

700+ active /3,409 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

An overview of server-side resources used by Embed Docs - Elementor Files Addon,Elementor Docs Addon,Embed PDF, Word, PowerPoint and Excel Files in Gutenberg & Elementor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.40 ▼1.77
Dashboard /wp-admin3.33 ▼0.0149.84 ▼11.53
Posts /wp-admin/edit.php3.38 ▲0.0349.80 ▲2.25
Add New Post /wp-admin/post-new.php5.91 ▲0.02100.08 ▼0.31
Media Library /wp-admin/upload.php3.26 ▲0.0338.11 ▼0.22

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
pdf_elementor_activation_time
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Embed Docs - Elementor Files Addon,Elementor Docs Addon,Embed PDF, Word, PowerPoint and Excel Files in Gutenberg & Elementor
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4514.73 ▲0.132.08 ▲0.3644.05 ▲0.50
Dashboard /wp-admin2,209 ▲415.65 ▲0.0895.39 ▼4.1741.63 ▼0.91
Posts /wp-admin/edit.php2,117 ▲171.96 ▼0.0436.24 ▼1.3036.74 ▼0.42
Add New Post /wp-admin/post-new.php6,380 ▲4,85427.79 ▲4.67931.09 ▲270.0257.05 ▼4.00
Media Library /wp-admin/upload.php1,420 ▲234.28 ▲0.13102.22 ▼10.0040.93 ▼4.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • pdf_elementor_activation_time
    • theysaidso_admin_options
    • widget_recent-comments

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ElementorEmbedDocs\\add_action() in wp-content/plugins/embed-docs/plugin.php:89

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)
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #2 (Embed Any Document Gutenberg Block), #3 (Block editor view and block options), #4 (Insert Document options for the Gutenberg Block), #5 (Add from URL option for the Gutenberg Block)
  • Tags: Too many tags (19 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

embed-docs/index.php 77% from 13 tests

Analyzing the main PHP file in "Embed Docs - Elementor Files Addon,Elementor Docs Addon,Embed PDF, Word, PowerPoint and Excel Files in Gutenberg & Elementor" version 3.0.1
Please make the necessary changes and fix the following:
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.0" instead of "7.2")
  • Main file name: Name the main plugin file the same as the plugin slug ("embed-docs.php" instead of "index.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 147 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin1,161 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP6169458838
JavaScript145159242
CSS113081

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity7.50
▷ Minimum class complexity2.00
▷ Maximum class complexity9.00
Average method complexity1.93
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods42
▷ Static methods12.38%
▷ Public methods3378.57%
▷ Protected methods819.05%
▷ Private methods12.38%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
18 PNG files occupy 0.89MB with 0.37MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png122.30KB33.25KB▼ 72.81%
assets/pdf-icon.png3.81KB2.19KB▼ 42.54%
assets/googledrive-icon.png5.19KB2.56KB▼ 50.60%
assets/icon-onedrive.png1.66KB1.57KB▼ 5.06%
assets/ppt-icon.png3.42KB2.09KB▼ 38.87%