78% envydoc

Code Review | EnvyDoc - WordPress Plugin for Ultimate Online Documentation

WordPress plugin EnvyDoc - WordPress Plugin for Ultimate Online Documentation scored78%from 54 tests.

About plugin

  • Plugin page: envydoc
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.7
  • WordPress version: 6.3.1
  • First release: Jan 19, 2021
  • Latest release: Mar 14, 2021
  • Number of updates: 8
  • Update frequency: every 6.8 days
  • Top authors: envytheme (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /523 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.63MB] [CPU: ▼2.38ms] Passed 4 tests

Analyzing server-side resources used by EnvyDoc - WordPress Plugin for Ultimate Online Documentation
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.15 ▲0.6944.55 ▲3.41
Dashboard /wp-admin3.94 ▲0.6450.60 ▼0.92
Posts /wp-admin/edit.php3.99 ▲0.6454.35 ▲2.01
Add New Post /wp-admin/post-new.php6.65 ▲0.7688.38 ▼14.03
Media Library /wp-admin/upload.php3.80 ▲0.5743.29 ▲5.75
/wp-admin/admin.php?page=kb_reorder_submenu3.8938.83
All Docs /wp-admin/admin.php?page=envy-doc-plugin3.7838.85
Categories /wp-admin/edit-tags.php?taxonomy=categories&post_type=envydoc3.7938.94
Knowledge Base /wp-admin/edit.php?post_type=envydoc-kb3.8439.16
KB Sections /wp-admin/edit-tags.php?taxonomy=sections&post_type=envydoc-kb3.7937.52
Settings /wp-admin/admin.php?page=envy_doc_plugin_settings3.7736.05

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 76 new files
Database: no new tables, 9 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_envy_doc_related_post_widget_callback
widget_envy_doc_popular_post_widget_callback
can_compress_scripts
theysaidso_admin_options
widget_envy_doc_widget_function
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for EnvyDoc - WordPress Plugin for Ultimate Online Documentation
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,000 ▲25413.84 ▼0.846.42 ▲4.5447.48 ▲2.13
Dashboard /wp-admin2,254 ▲665.15 ▼0.88107.40 ▲1.5239.31 ▼9.94
Posts /wp-admin/edit.php2,207 ▲1152.28 ▲0.2440.28 ▲1.0539.71 ▲3.78
Add New Post /wp-admin/post-new.php1,561 ▲4023.23 ▲0.28654.59 ▲16.8257.88 ▲0.54
Media Library /wp-admin/upload.php1,442 ▲574.33 ▲0.07113.56 ▼0.1248.12 ▲1.07
/wp-admin/admin.php?page=kb_reorder_submenu8842.0928.2124.55
All Docs /wp-admin/admin.php?page=envy-doc-plugin8972.1527.5925.17
Categories /wp-admin/edit-tags.php?taxonomy=categories&post_type=envydoc1,3222.1130.0929.75
Knowledge Base /wp-admin/edit.php?post_type=envydoc-kb1,1832.4433.6732.07
KB Sections /wp-admin/edit-tags.php?taxonomy=sections&post_type=envydoc-kb1,3222.1131.0329.81
Settings /wp-admin/admin.php?page=envy_doc_plugin_settings9561.9329.5527.48

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
  • Zombie WordPress options detected upon uninstall: 9 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_envy_doc_related_post_widget_callback
    • widget_recent-posts
    • widget_envy_doc_widget_function
    • theysaidso_admin_options
    • widget_envy_doc_popular_post_widget_callback

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=envy_doc_plugin_settings
    • > Notice in wp-content/plugins/envydoc/admin/partials/envy-doc-admin-settings.php+57
    Undefined variable: envy_doc_page_type_new
    • > GET request to /wp-admin/admin.php?page=envy_doc_plugin_settings
    • > Notice in wp-content/plugins/envydoc/admin/partials/envy-doc-admin-settings.php+80
    Undefined variable: envy_doc_kb_page_type_new

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 25× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/envydoc/includes/widgets/templates/envy-kb-related-post-display.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/envydoc/admin/partials/envy-kb-admin-reorder-display.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_singular() in wp-content/plugins/envydoc/public/partials/doc/envy-doc-single-display.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/envydoc/admin/partials/envy-doc-admin-settings.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/envydoc/admin/partials/envy-doc-admin-display.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/envydoc/public/partials/kb/envy-kb-public-display.php:141
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/envydoc/admin/partials/display/envy-doc-admin-parent-display.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/envydoc/public/partials/envy-doc-public-display.php:137
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/envydoc/includes/class-envy-kb-metabox.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_singular() in wp-content/plugins/envydoc/public/partials/kb/envy-kb-single-display.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: edit, online, trash, category, doc...

envydoc/envy-doc.php 85% from 13 tests

The principal PHP file in "EnvyDoc - WordPress Plugin for Ultimate Online Documentation" v. 1.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("envydoc.php" instead of "envy-doc.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin9,514 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
PHP404776274,650
SVG1002,671
PO File54806051,086
CSS3725833
JavaScript42110274

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity3.82
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.82
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods39
▷ Static methods25.13%
▷ Public methods3487.18%
▷ Protected methods00.00%
▷ Private methods512.82%
Functions76
▷ Named functions76100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin