83% embed-sharepoint-onedrive-documents

Code Review | Embed SharePoint OneDrive Library/Documents/Files

WordPress plugin Embed SharePoint OneDrive Library/Documents/Files scored83%from 54 tests.

About plugin

  • Plugin page: embed-sharepoint-...
  • Plugin version: 2.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4
  • WordPress version: 6.3.1
  • First release: Jul 6, 2022
  • Latest release: Nov 21, 2023
  • Number of updates: 30
  • Update frequency: every 16.9 days
  • Top authors: moazsup (60%)manish471 (43.33%)

Code review

54 tests

User reviews

11 reviews

Install metrics

400+ active /7,348 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.21ms] Passed 4 tests

This is a short check of server-side resources used by Embed SharePoint OneDrive Library/Documents/Files
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.74 ▲0.53
Dashboard /wp-admin3.33 ▲0.0246.18 ▼3.99
Posts /wp-admin/edit.php3.44 ▲0.0848.41 ▲2.49
Add New Post /wp-admin/post-new.php5.92 ▲0.0490.79 ▼3.87
Media Library /wp-admin/upload.php3.25 ▲0.0237.50 ▲3.80

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 111 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
mo_sps_feedback_config

Browser metrics Passed 4 tests

Checking browser requirements for Embed SharePoint OneDrive Library/Documents/Files
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲4714.17 ▼0.541.75 ▲0.1042.92 ▼0.92
Dashboard /wp-admin2,202 ▲255.61 ▼0.0596.05 ▲8.3268.74 ▲29.33
Posts /wp-admin/edit.php2,128 ▲282.01 ▼0.0037.48 ▲0.8934.28 ▼1.64
Add New Post /wp-admin/post-new.php6,211 ▲4,68226.13 ▲2.95902.06 ▲309.9636.15 ▼10.35
Media Library /wp-admin/upload.php1,447 ▲444.31 ▲0.1598.53 ▲1.8580.71 ▲38.61

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • mo_sps_feedback_config
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

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 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
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Async_Request' not found in wp-content/plugins/embed-sharepoint-onedrive-documents/vendor/deliciousbrains/wp-background-processing/classes/wp-background-process.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/embed-sharepoint-onedrive-documents/vendor/deliciousbrains/wp-background-processing/wp-background-processing.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function MoSharePointObjectSync\\add_action() in wp-content/plugins/embed-sharepoint-onedrive-documents/embed-sharepoint-onedrive-documents.php:46

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Requires php: Version format is invalid
The official readme.txt is a good inspiration

embed-sharepoint-onedrive-documents/embed-sharepoint-onedrive-documents.php 92% from 13 tests

This is the main PHP file of "Embed SharePoint OneDrive Library/Documents/Files" version 2.1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 160 characters long)

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
There were no executable files found in this plugin9,173 lines of code in 69 files:
LanguageFilesBlank linesComment linesLines of code
PHP371,0326705,207
CSS7219923,048
JavaScript79211609
SVG1413145
Markdown1600112
JSON30052

PHP code Passed 2 tests

An short overview of 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.33
Average class complexity17.07
▷ Minimum class complexity1.00
▷ Maximum class complexity59.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes29
▷ Abstract classes26.90%
▷ Concrete classes2793.10%
▷ Final classes00.00%
Methods223
▷ Static methods5524.66%
▷ Public methods15167.71%
▷ Protected methods188.07%
▷ Private methods5424.22%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants29
▷ Global constants310.34%
▷ Class constants2689.66%
▷ Public constants26100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
32 PNG files occupy 1.89MB with 0.98MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/auto_connection_step2.png116.32KB50.18KB▼ 56.86%
images/doc_preview_step.png359.53KB107.02KB▼ 70.23%
images/folder.png9.48KB5.50KB▼ 41.94%
images/userr.png1.39KB0.67KB▼ 51.65%
images/copy.png8.77KB5.34KB▼ 39.09%