90% importdoc-block

Code Review | ImportDoc Block

WordPress plugin ImportDoc Block scored 90% from 54 tests.

About plugin

  • Plugin page: importdoc-block
  • Plugin version: 0.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Aug 10, 2019
  • Latest release: May 28, 2020
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: importdoc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 1,485 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

An overview of server-side resources used by ImportDoc Block
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.06 ▼1.39
Dashboard /wp-admin3.32 ▲0.0144.66 ▼5.26
Posts /wp-admin/edit.php3.37 ▲0.0148.00 ▼0.90
Add New Post /wp-admin/post-new.php5.90 ▲0.0284.91 ▼13.01
Media Library /wp-admin/upload.php3.24 ▲0.0138.73 ▲5.43

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for ImportDoc Block
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲5313.65 ▼0.951.52 ▼0.4639.69 ▼4.81
Dashboard /wp-admin2,206 ▲185.83 ▲0.96100.90 ▼5.0339.66 ▼1.57
Posts /wp-admin/edit.php2,092 ▲32.01 ▲0.0139.61 ▲4.3436.14 ▲5.57
Add New Post /wp-admin/post-new.php6,415 ▲4,89621.00 ▼1.98892.43 ▲239.0952.93 ▼2.85
Media Library /wp-admin/upload.php1,385 ▼64.27 ▲0.0595.73 ▼6.2644.23 ▲1.31

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: googledocs, importdoc, html, block

importdoc-block/plugin.php 92% from 13 tests

"ImportDoc Block" version 0.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("importdoc-block.php" instead of "plugin.php")

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
Success! There were no dangerous files found in this plugin7,167 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JSON2006,981
JavaScript4123282
PHP295648
Sass33138
Markdown17016
CSS2002

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

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 files were detected