84% document

Code Review | Document Block - Upload & Embed Docs, PDF, PPT, XLS or Any Documents

WordPress plugin Document Block - Upload & Embed Docs, PDF, PPT, XLS or Any Documents scored84%from 54 tests.

About plugin

  • Plugin page: document
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.0
  • WordPress version: 6.3.1
  • First release: Jul 25, 2020
  • Latest release: Aug 21, 2022
  • Number of updates: 7
  • Update frequency: every 108.1 days
  • Top authors: Asif2BD (85.71%)wpdevteam (28.57%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /9,103 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Document Block - Upload & Embed Docs, PDF, PPT, XLS or Any Documents
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0250.25 ▲7.68
Dashboard /wp-admin3.32 ▲0.0150.72 ▼3.44
Posts /wp-admin/edit.php3.37 ▲0.0148.97 ▲0.88
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.00 ▼12.70
Media Library /wp-admin/upload.php3.25 ▲0.0143.99 ▲5.36

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Document Block - Upload & Embed Docs, PDF, PPT, XLS or Any Documents
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲11113.45 ▼0.789.64 ▲7.6044.93 ▼4.34
Dashboard /wp-admin2,198 ▲215.60 ▼0.1097.14 ▼3.5942.01 ▼4.00
Posts /wp-admin/edit.php2,097 ▼32.04 ▲0.0436.14 ▼4.2534.44 ▼1.66
Add New Post /wp-admin/post-new.php6,368 ▲4,83727.85 ▲4.70994.00 ▲277.4739.07 ▼19.54
Media Library /wp-admin/upload.php1,400 ▼04.12 ▼0.04112.11 ▼8.3350.04 ▲0.66

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means 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 fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/document/document.php:75

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt is a good inspiration

document/document.php Passed 13 tests

The principal PHP file in "Document Block - Upload & Embed Docs, PDF, PPT, XLS or Any Documents" v. 1.1.0 is loaded by WordPress automatically on each request
61 characters long description:
Embed Docs, PDF, PPT, XLS or Any Documents Without Any Coding

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin77 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP281949
JavaScript21816
JSON10010
CSS2202

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
There were not PNG files found in your plugin