84% onlyoffice

Code Review | ONLYOFFICE

WordPress plugin ONLYOFFICE scored84%from 54 tests.

About plugin

  • Plugin page: onlyoffice
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.1
  • WordPress version: 6.3.1
  • First release: May 11, 2022
  • Latest release: Oct 9, 2023
  • Number of updates: 5
  • Update frequency: every 104.2 days
  • Top authors: onlyoffice (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,222 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
Installer ran successfully

Server metrics [RAM: ▲0.34MB] [CPU: ▼2.05ms] Passed 4 tests

Server-side resources used by ONLYOFFICE
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3448.67 ▲7.65
Dashboard /wp-admin3.66 ▲0.3152.93 ▼10.31
Posts /wp-admin/edit.php3.71 ▲0.3554.58 ▲6.17
Add New Post /wp-admin/post-new.php6.25 ▲0.3694.72 ▼8.86
Media Library /wp-admin/upload.php3.57 ▲0.3442.47 ▲4.79
Settings /wp-admin/admin.php?page=onlyoffice-settings3.5537.08
Files /wp-admin/admin.php?page=onlyoffice-files3.5537.19

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 99 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
onlyoffice-formats
can_compress_scripts
onlyoffice-plugin-uuid
widget_recent-comments
onlyoffice-plugin-bytes
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for ONLYOFFICE
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,875 ▲11414.35 ▼0.072.57 ▲1.0045.53 ▲5.02
Dashboard /wp-admin2,248 ▲685.61 ▲0.0287.89 ▼7.4939.35 ▼2.42
Posts /wp-admin/edit.php2,162 ▲622.07 ▲0.0440.78 ▲4.2835.79 ▼6.40
Add New Post /wp-admin/post-new.php6,391 ▲4,84627.75 ▲4.72934.53 ▲302.9441.72 ▼8.80
Media Library /wp-admin/upload.php1,459 ▲594.27 ▲0.0199.34 ▼7.8973.27 ▲27.66
Settings /wp-admin/admin.php?page=onlyoffice-settings1,0572.0625.8731.64
Files /wp-admin/admin.php?page=onlyoffice-files1,0651.7128.9130.49

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • onlyoffice-formats
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
The following issues need your attention
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/onlyoffice/includes/files/class-onlyoffice-plugin-files-list-table.php on line 32
    • > PHP Fatal error
      Uncaught Error: Interface 'Firebase\\JWT\\JWTExceptionWithPayloadInterface' not found in wp-content/plugins/onlyoffice/vendor/firebase/php-jwt/src/BeforeValidException.php:5
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/onlyoffice/includes/files/class-onlyoffice-plugin-files-list-table.php on line 32
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/onlyoffice/includes/files/class-onlyoffice-plugin-files-list-table.php on line 32
    • > PHP Fatal error
      Uncaught Error: Interface 'Firebase\\JWT\\JWTExceptionWithPayloadInterface' not found in wp-content/plugins/onlyoffice/vendor/firebase/php-jwt/src/ExpiredException.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/onlyoffice/onlyoffice-wordpress.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/onlyoffice/onlyoffice-tinymce/onlyoffice-tinymce.php:39

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: editor, office, integration, document, presentation...

onlyoffice/onlyoffice-wordpress.php 85% from 13 tests

The main file in "ONLYOFFICE" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("onlyoffice.php" instead of "onlyoffice-wordpress.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
No dangerous file extensions were detected26,225 lines of code in 73 files:
LanguageFilesBlank linesComment linesLines of code
JSON70022,324
PHP405982,1832,637
Markdown51470481
PO File81760456
JavaScript63685179
SVG40077
CSS39071

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity11.71
▷ Minimum class complexity1.00
▷ Maximum class complexity76.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces3
Interfaces1
Traits0
Classes30
▷ Abstract classes00.00%
▷ Concrete classes30100.00%
▷ Final classes13.33%
Methods164
▷ Static methods6841.46%
▷ Public methods13481.71%
▷ Protected methods10.61%
▷ Private methods2917.68%
Functions14
▷ Named functions964.29%
▷ Anonymous functions535.71%
Constants21
▷ Global constants29.52%
▷ Class constants1990.48%
▷ Public constants526.32%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin