78% ilab-docs

Code Review | WP Help Docs

WordPress plugin WP Help Docs scored78%from 54 tests.

About plugin

  • Plugin page: ilab-docs
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9.8
  • WordPress version: 6.3.1
  • First release: Oct 27, 2018
  • Latest release: Oct 27, 2018
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: interfacelab (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /658 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼0.50ms] Passed 4 tests

This is a short check of server-side resources used by WP Help Docs
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0543.24 ▲6.60
Dashboard /wp-admin3.46 ▲0.1548.93 ▼2.14
Posts /wp-admin/edit.php3.57 ▲0.2150.06 ▲6.42
Add New Post /wp-admin/post-new.php6.04 ▲0.1582.37 ▼9.00
Media Library /wp-admin/upload.php3.38 ▲0.1534.82 ▲2.72

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 155 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WP Help Docs
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▲0.001.75 ▲0.2643.90 ▲3.20
Dashboard /wp-admin2,195 ▲185.56 ▼0.0983.76 ▼0.0239.94 ▲1.13
Posts /wp-admin/edit.php2,103 ▲31.98 ▼0.0249.84 ▲9.6944.31 ▲8.30
Add New Post /wp-admin/post-new.php1,526 ▼023.29 ▲0.30642.51 ▲31.0867.15 ▲6.75
Media Library /wp-admin/upload.php1,403 ▼04.28 ▲0.0695.60 ▼8.2541.89 ▼2.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% 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 0% 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
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/ilab-docs/classes/Plugin/DocsPlugin.php
    • > /wp-content/plugins/ilab-docs/classes/CLI/Command.php
    • > /wp-content/plugins/ilab-docs/vendor/michelf/php-markdown/Readme.php
    • > /wp-content/plugins/ilab-docs/classes/CLI/Search/SearchCommands.php
    • > /wp-content/plugins/ilab-docs/vendor/masterminds/html5/bin/entities.php
  • 62× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Masterminds\\HTML5\\Tests\\TestCase' not found in wp-content/plugins/ilab-docs/vendor/masterminds/html5/test/HTML5/Parser/TreeBuildingRulesTest.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Masterminds\\HTML5\\Serializer\\RulesInterface' not found in wp-content/plugins/ilab-docs/vendor/masterminds/html5/src/HTML5/Serializer/OutputRules.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/ilab-docs/vendor/teamtnt/tntsearch/tests/support/HighlighterTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/ilab-docs/vendor/teamtnt/tntsearch/tests/indexer/TNTIndexerTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Masterminds\\HTML5\\Tests\\TestCase' not found in wp-content/plugins/ilab-docs/vendor/masterminds/html5/test/HTML5/Parser/FileInputStreamTest.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Masterminds\\HTML5\\Tests\\TestCase' not found in wp-content/plugins/ilab-docs/vendor/masterminds/html5/test/HTML5/Parser/TokenizerTest.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/ilab-docs/vendor/teamtnt/tntsearch/tests/spell/JaroWinklerDistanceTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/ilab-docs/vendor/teamtnt/tntsearch/tests/classifier/TNTClassifierTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Michelf\\Markdown' not found in wp-content/plugins/ilab-docs/vendor/michelf/php-markdown/Michelf/MarkdownExtra.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'TeamTNT\\TNTSearch\\Stemmer\\Stemmer' not found in wp-content/plugins/ilab-docs/vendor/teamtnt/tntsearch/src/Stemmer/ArabicStemmer.php:9

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
5 plugin tags: help, markdown, admin, docs, documentation

ilab-docs/ilab-docs.php 92% from 13 tests

"WP Help Docs" version 1.0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 144 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin24,034 lines of code in 136 files:
LanguageFilesBlank linesComment linesLines of code
PHP1082,8884,67517,235
HTML21,089565,268
Markdown1446901,128
JSON500279
YAML314087
XML211135
CSS1001
JavaScript1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity14.72
▷ Minimum class complexity1.00
▷ Maximum class complexity130.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces22
Interfaces9
Traits0
Classes84
▷ Abstract classes11.19%
▷ Concrete classes8398.81%
▷ Final classes00.00%
Methods796
▷ Static methods10613.32%
▷ Public methods55269.35%
▷ Protected methods16220.35%
▷ Private methods8210.30%
Functions20
▷ Named functions525.00%
▷ Anonymous functions1575.00%
Constants69
▷ Global constants45.80%
▷ Class constants6594.20%
▷ Public constants65100.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 were not PNG files found in your plugin