84% mammoth-docx-converter

Code Review | Mammoth .docx converter

WordPress plugin Mammoth .docx converter scored84%from 54 tests.

About plugin

  • Plugin page: mammoth-docx-conv...
  • Plugin version: 1.20.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0.0
  • WordPress version: 6.3.1
  • First release: May 12, 2013
  • Latest release: May 30, 2022
  • Number of updates: 108
  • Update frequency: every 30.6 days
  • Top authors: michaelwilliamson (100%)

Code review

54 tests

User reviews

59 reviews

Install metrics

30,000+ active /352,458 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
Install script ran successfully

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

This is a short check of server-side resources used by Mammoth .docx converter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.45 ▲3.53
Dashboard /wp-admin3.32 ▲0.0146.73 ▼6.93
Posts /wp-admin/edit.php3.37 ▲0.0149.73 ▼0.09
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.28 ▼17.70
Media Library /wp-admin/upload.php3.24 ▲0.0135.86 ▼0.56

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Mammoth .docx converter
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5815.00 ▲0.621.79 ▲0.2443.47 ▲5.59
Dashboard /wp-admin2,213 ▲256.62 ▲0.72135.20 ▲28.5537.53 ▼8.68
Posts /wp-admin/edit.php2,097 ▲83.27 ▲1.2849.02 ▲8.4836.14 ▼1.61
Add New Post /wp-admin/post-new.php6,286 ▲4,75327.46 ▲4.33958.53 ▲340.5743.40 ▼14.27
Media Library /wp-admin/upload.php1,387 ▼15.80 ▲1.54103.69 ▲2.3043.39 ▼0.96

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mammoth-docx-converter/mammoth-docx-converter.php:12

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 issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: html, docx, paste, word, office

mammoth-docx-converter/mammoth-docx-converter.php Passed 13 tests

The entry point to "Mammoth .docx converter" version 1.20.0 is a PHP file that has certain tags in its header comment area
81 characters long description:
Mammoth converts semantically marked up .docx documents to simple and clean HTML.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin19,010 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript22,8681,22918,878
PHP117988
CSS112044

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.13
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin