69% custom-user-guide

Code Review | Custom User Guide

WordPress plugin Custom User Guide scored69%from 54 tests.

About plugin

  • Plugin page: custom-user-guide
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 25, 2020
  • Latest release: May 25, 2022
  • Number of updates: 23
  • Update frequency: every 23.7 days
  • Top authors: assylkhanrakhatov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /843 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲4.68MB] [CPU: ▲28.88ms] Passed 4 tests

This is a short check of server-side resources used by Custom User Guide
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /8.48 ▲4.9866.90 ▲26.43
Dashboard /wp-admin8.50 ▲5.1677.96 ▲27.22
Posts /wp-admin/edit.php8.50 ▲5.1179.55 ▲31.87
Add New Post /wp-admin/post-new.php9.40 ▲3.47120.02 ▲30.01
Media Library /wp-admin/upload.php8.50 ▲5.2387.11 ▲50.33
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius8.5065.78

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 204 new files
Database: 2 new tables, 10 new options
New tables
wp_customuserguide_tours
wp_customuserguide_steps
New WordPress options
widget_theysaidso_widget
fs_gdpr
db_upgraded
widget_recent-posts
fs_active_plugins
fs_accounts
theysaidso_admin_options
fs_debug_mode
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom User Guide
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,939 ▲17815.14 ▲1.9610.37 ▲5.2932.13 ▼11.66
Dashboard /wp-admin2,236 ▲595.75 ▲0.1998.77 ▲2.3448.44 ▲7.28
Posts /wp-admin/edit.php2,150 ▲532.92 ▲0.9843.60 ▲5.2040.65 ▲5.85
Add New Post /wp-admin/post-new.php1,555 ▲2723.46 ▲0.48656.88 ▼55.8654.46 ▲3.12
Media Library /wp-admin/upload.php1,447 ▲534.93 ▲0.72111.71 ▲5.8152.17 ▲6.13
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,0892.3631.5531.09

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/custom-user-guide/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • Zombie tables detected upon uninstall: 2 tables
    • wp_customuserguide_tours
    • wp_customuserguide_steps
  • The uninstall procedure has failed, leaving 10 options in the database
    • widget_recent-posts
    • fs_gdpr
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • fs_debug_mode
    • fs_accounts
    • widget_theysaidso_widget
    • fs_active_plugins
    • db_upgraded

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Requires at least: Invalid plugin version format
  • Contributors: The plugin contributors field is not present
Please take inspiration from this readme.txt

custom-user-guide/custom-user-guide.php Passed 13 tests

"Custom User Guide" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
82 characters long description:
Custom User Guide plugin allows you to build visual tutorials/guides on your site.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected36,121 lines of code in 153 files:
LanguageFilesBlank linesComment linesLines of code
PHP1177,41716,43032,491
JavaScript122812642,168
CSS21144301,030
Markdown1680214
PO File18789191
JSON10027

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 2,910)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity78.93
▷ Minimum class complexity1.00
▷ Maximum class complexity2,910.00
Average method complexity4.62
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes54
▷ Abstract classes23.70%
▷ Concrete classes5296.30%
▷ Final classes00.00%
Methods1,193
▷ Static methods18715.67%
▷ Public methods81968.65%
▷ Protected methods312.60%
▷ Private methods34328.75%
Functions97
▷ Named functions97100.00%
▷ Anonymous functions00.00%
Constants123
▷ Global constants9879.67%
▷ Class constants2520.33%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
11 PNG files occupy 0.12MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/tooltip-close.png1.58KB0.67KB▼ 57.86%
assets/img/NubRight.png0.36KB0.29KB▼ 19.89%
assets/img/jquery.minicolors.png67.02KB34.31KB▼ 48.80%
assets/img/NubLeft.png0.35KB0.28KB▼ 20.72%
assets/img/doc/StepDescription.png11.83KB4.78KB▼ 59.55%