83% pdf-office-documents-converter

Code Review | pdf office documents converter

WordPress plugin pdf office documents converter scored83%from 54 tests.

About plugin

  • Plugin page: pdf-office-docume...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5.3
  • WordPress version: 6.3.1
  • First release: Nov 27, 2020
  • Latest release: Nov 27, 2020
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: vvpdf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /739 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.02MB] [CPU: ▼5.14ms] Passed 4 tests

A check of server-side resources used by pdf office documents converter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.67 ▼6.36
Dashboard /wp-admin3.32 ▲0.0251.62 ▼4.38
Posts /wp-admin/edit.php3.37 ▲0.0248.05 ▼9.40
Add New Post /wp-admin/post-new.php5.91 ▲0.0296.95 ▲2.27
Media Library /wp-admin/upload.php3.25 ▲0.0237.81 ▼0.43
Created Pages /wp-admin/admin.php?page=your-admin-sub-menu13.3149.90

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 56 new files
Database: no new tables, 14 new options
New WordPress options
vvpdf_vvpdf_wp_plugin_page_insert_index_result
vvpdf_vvpdf_wp_plugin_page_insert_wordtopdf_result
vvpdf_vvpdf_wp_plugin_page_insert_pdftoexcel_result
widget_theysaidso_widget
vvpdf_vvpdf_wp_plugin_page_insert_ppttopdf_result
widget_recent-posts
vvpdf_vvpdf_wp_plugin_page_insert_pdftojpg_result
vvpdf_vvpdf_wp_plugin_page_insert_exceltopdf_result
can_compress_scripts
vvpdf_vvpdf_wp_plugin_page_insert_pdftoppt_result
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for pdf office documents converter
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,971 ▲22514.00 ▼0.3821.83 ▲19.5741.80 ▼1.31
Dashboard /wp-admin2,236 ▲515.87 ▲0.94103.50 ▼9.3941.20 ▼0.86
Posts /wp-admin/edit.php2,116 ▲272.03 ▲0.0234.30 ▼5.0434.32 ▼0.65
Add New Post /wp-admin/post-new.php1,555 ▲3623.17 ▼0.17677.88 ▲35.3966.62 ▲1.62
Media Library /wp-admin/upload.php1,415 ▲244.30 ▲0.04108.51 ▲3.7649.91 ▲5.94
PDF Converter /wp-admin/admin.php?page=pdf-office-documents-converter/PDF Office Documents Converter.php8502.1423.5126.37
Created Pages /wp-admin/admin.php?page=your-admin-sub-menu17772.0324.9624.41

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 14 options in the database
    • vvpdf_vvpdf_wp_plugin_page_insert_index_result
    • vvpdf_vvpdf_wp_plugin_page_insert_pdftojpg_result
    • widget_recent-comments
    • vvpdf_vvpdf_wp_plugin_page_insert_wordtopdf_result
    • vvpdf_vvpdf_wp_plugin_page_insert_exceltopdf_result
    • widget_recent-posts
    • vvpdf_vvpdf_wp_plugin_page_insert_ppttopdf_result
    • vvpdf_vvpdf_wp_plugin_page_insert_pdftoexcel_result
    • can_compress_scripts
    • theysaidso_admin_options
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/pdf-office-documents-converter/page_new.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can take inspiration from this readme.txt

pdf-office-documents-converter/PDF Office Documents Converter.php 85% from 13 tests

"pdf office documents converter" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("pdf-office-documents-converter.php" instead of "PDF Office Documents Converter.php")
  • Description: The description should be shorter than 140 characters (currently 153 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected5,490 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript298496964,025
PHP28926712
CSS759471
Markdown21580282

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods480.00%
▷ Protected methods00.00%
▷ Private methods120.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/modules/layer/default/icon-ext.png5.77KB2.91KB▼ 49.62%
js/css/modules/layer/default/icon-ext.png5.77KB2.91KB▼ 49.62%
css/modules/layer/default/icon.png11.22KB4.36KB▼ 61.19%
js/css/modules/layer/default/icon.png11.22KB4.36KB▼ 61.19%