84% admin-help-docs

Code Review | Admin Help Docs

WordPress plugin Admin Help Docs scored84%from 54 tests.

About plugin

  • Plugin page: admin-help-docs
  • Plugin version: 1.2.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 23, 2023
  • Latest release: Nov 21, 2023
  • Number of updates: 22
  • Update frequency: every 13.7 days
  • Top authors: apos37 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

40+ active /945 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.66MB] [CPU: ▲5.19ms] Passed 4 tests

Analyzing server-side resources used by Admin Help Docs
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1341.26 ▲1.38
Dashboard /wp-admin4.15 ▲0.8058.57 ▼3.57
Posts /wp-admin/edit.php4.20 ▲0.8560.13 ▲10.61
Add New Post /wp-admin/post-new.php6.76 ▲0.87111.13 ▲12.32
Media Library /wp-admin/upload.php4.07 ▲0.8453.56 ▲17.60
Folders /wp-admin/edit-tags.php?taxonomy=help-docs-folder4.2351.07
Documentation /wp-admin/admin.php?page=admin-help-docs&tab=documentation4.0949.87
Settings /wp-admin/admin.php?page=admin-help-docs&tab=settings4.2454.14
Manage /wp-admin/edit.php?post_type=help-docs4.1551.37
FAQ /wp-admin/admin.php?page=admin-help-docs&tab=faq4.0249.68
About /wp-admin/admin.php?page=admin-help-docs&tab=about4.16338.35
Imports /wp-admin/edit.php?post_type=help-doc-imports4.1550.94

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 55 new files
Database: no new tables, 8 new options
New WordPress options
helpdocs_plugin_installed
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
helpdocs_plugin_activated
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Admin Help Docs
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲9114.65 ▲0.411.83 ▲0.2237.62 ▼5.13
Dashboard /wp-admin2,246 ▲725.62 ▲0.0483.51 ▼18.0936.77 ▼6.18
Posts /wp-admin/edit.php2,143 ▲432.07 ▲0.0436.91 ▼3.2433.22 ▼3.11
Add New Post /wp-admin/post-new.php1,571 ▲3724.94 ▼0.11606.87 ▼36.8257.49 ▼11.93
Media Library /wp-admin/upload.php1,446 ▲494.17 ▼0.0495.47 ▼4.4442.35 ▼1.03
Folders /wp-admin/edit-tags.php?taxonomy=help-docs-folder1,3682.0931.0436.40
Documentation /wp-admin/admin.php?page=admin-help-docs&tab=documentation8831.8534.9132.04
Settings /wp-admin/admin.php?page=admin-help-docs&tab=settings2,4892.0426.5540.83
Manage /wp-admin/edit.php?post_type=help-docs1,3401.8831.9731.28
FAQ /wp-admin/admin.php?page=admin-help-docs&tab=faq1,3201.9926.4762.73
About /wp-admin/admin.php?page=admin-help-docs&tab=about1,0952.0122.7431.25
Imports /wp-admin/edit.php?post_type=help-doc-imports1,1941.9033.6929.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • helpdocs_plugin_installed
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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
Please fix the following items
  • 13× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function helpdocs_get() in wp-content/plugins/admin-help-docs/includes/admin/header-page.php:7
    • > PHP Warning
      Use of undefined constant HELPDOCS_PLUGIN_ADMIN_PATH - assumed 'HELPDOCS_PLUGIN_ADMIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/admin-help-docs/includes/admin/header.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function helpdocs_get() in wp-content/plugins/admin-help-docs/includes/admin/header-page.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'HELPDOCS_COLORS' not found in wp-content/plugins/admin-help-docs/includes/admin/option-about.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'HELPDOCS_COLORS' not found in wp-content/plugins/admin-help-docs/includes/admin/option-documentation.php:3
    • > PHP Warning
      include(): Failed opening 'HELPDOCS_PLUGIN_ADMIN_PATHcss/style.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/admin-help-docs/includes/admin/header.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function helpdocs_get() in wp-content/plugins/admin-help-docs/includes/admin/header-page.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function helpdocs_get() in wp-content/plugins/admin-help-docs/includes/admin/header-page.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function helpdocs_get() in wp-content/plugins/admin-help-docs/includes/admin/header-page.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function helpdocs_get() in wp-content/plugins/admin-help-docs/includes/admin/header-page.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 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, how-to, documentation, admin, instructions

admin-help-docs/admin-help-docs.php Passed 13 tests

"Admin Help Docs" version 1.2.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
85 characters long description:
Site developers and operators can easily create help documentation for the admin area

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
No dangerous file extensions were detected6,290 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP311,4682,1725,748
JavaScript5105112463
CSS10079

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity31.50
▷ Minimum class complexity1.00
▷ Maximum class complexity249.00
Average method complexity6.47
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods85
▷ Static methods22.35%
▷ Public methods85100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions59
▷ Named functions4474.58%
▷ Anonymous functions1525.42%
Constants26
▷ Global constants26100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
9 PNG files occupy 0.22MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/admin/img/icon_stackex.png3.48KB0.70KB▼ 79.82%
includes/admin/img/text-area-resizer_wh_sm.png0.46KB0.31KB▼ 32.41%
includes/admin/img/text-area-resizer_wh_sm_trans.png0.36KB0.23KB▼ 36.26%
includes/admin/img/text-area-resizer-wh-large.png2.75KB0.83KB▼ 69.76%
includes/admin/img/discord.png158.33KB63.98KB▼ 59.59%