94% convert-docx2post

Code Review | Convert Docx2post

WordPress plugin Convert Docx2post scored 94% from 53 tests.

About plugin

  • Plugin page: convert-docx2post
  • Plugin version: 1.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.4
  • WordPress version: 5.8.1
  • First release: Jan 21, 2018
  • Latest release: Feb 16, 2018
  • Number of updates: 48
  • Update frequency: every 0.6 days
  • Top authors: davorzeljkovic (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 750 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼295.39ms] Passed 4 tests

Server-side resources used by Convert Docx2post
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1231.36 ▲10.20
Dashboard /wp-admin3.06 ▲0.0144.96 ▲1.98
Posts /wp-admin/edit.php3.11 ▲0.0142.16 ▲1.16
Add New Post /wp-admin/post-new.php5.42 ▼0.0189.90 ▼1,181.49
Media Library /wp-admin/upload.php3.00 ▼0.0033.36 ▼3.20

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Convert Docx2post
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,654 ▲7216.13 ▲0.568.63 ▲1.2451.73 ▲2.57
Dashboard /wp-admin2,932 ▲795.91 ▲0.09144.11 ▲5.4599.57 ▼14.78
Posts /wp-admin/edit.php2,721 ▲152.69 ▼0.0062.44 ▼8.0987.45 ▼4.57
Add New Post /wp-admin/post-new.php1,863 ▲20719.09 ▲0.70363.05 ▼10.28111.32 ▼6.06
Media Library /wp-admin/upload.php1,787 ▲154.98 ▼0.04162.31 ▲2.63111.35 ▼4.16

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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
Almost there! Just fix the following items
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: alert in wp-content/plugins/convert-docx2post/options.php on line 238
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/convert-docx2post/admin.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/convert-docx2post/convert-docx2post.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_types() in wp-content/plugins/convert-docx2post/options.php:279

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: office, doc, word

convert-docx2post/convert-docx2post.php Passed 13 tests

The entry point to "Convert Docx2post" version 1.4 is a PHP file that has certain tags in its header comment area
88 characters long description:
Convert Microsoft Word docx or text files to Wordpress posts, pages or custom post types

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 plugin241 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods250.00%
▷ Protected methods00.00%
▷ Private methods250.00%
▷ Named functions2100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin