58% how-to-wp

Code Review | WP How to - WordPress Tutorial Videos

WordPress plugin WP How to - WordPress Tutorial Videos scored58%from 54 tests.

About plugin

  • Plugin page: how-to-wp
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-6.0.1
  • WordPress version: 6.3.1
  • First release: Jul 15, 2022
  • Latest release: Aug 23, 2022
  • Number of updates: 17
  • Update frequency: every 2.3 days
  • Top authors: imoptimal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /769 total downloads

Benchmarks

Plugin footprint 47% 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: ▲4.64MB] [CPU: ▲22.30ms] 75% from 4 tests

Server-side resources used by WP How to - WordPress Tutorial Videos
Please fix the following
  • CPU: Total CPU usage should be kept under 500.00ms (currently 2,072.87ms on /wp-admin/admin.php?page=how-to-wp)
PageMemory (MB)CPU Time (ms)
Home /8.51 ▲5.0461.69 ▲22.79
Dashboard /wp-admin8.53 ▲5.2274.43 ▲25.59
Posts /wp-admin/edit.php8.53 ▲5.1768.98 ▲17.42
Add New Post /wp-admin/post-new.php9.02 ▲3.13112.89 ▲23.39
Media Library /wp-admin/upload.php8.53 ▲5.3061.91 ▲27.26
WP How to - WordPress Tutorial Videos /wp-admin/admin.php?page=how-to-wp8.532,072.87
Freemius Debug [v.2.4.5] /wp-admin/admin.php?page=freemius8.5360.22

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 176 new files
Database: 1 new table, 11 new options
New tables
wp_wp_how_to_favs
New WordPress options
fs_debug_mode
widget_recent-comments
widget_recent-posts
fs_active_plugins
can_compress_scripts
fs_gdpr
db_upgraded
wp_how_to_favs_db_version
theysaidso_admin_options
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

An overview of browser requirements for WP How to - WordPress Tutorial Videos
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,082 ▲34714.43 ▲0.071.69 ▲0.0329.04 ▼17.98
Dashboard /wp-admin3,152 ▲9645.99 ▲0.09110.85 ▲8.0543.50 ▼1.20
Posts /wp-admin/edit.php3,499 ▲1,4079.73 ▲7.70306.92 ▲266.0437.13 ▼1.30
Add New Post /wp-admin/post-new.php1,930 ▲41623.38 ▲5.81680.30 ▲36.3135.54 ▼23.29
Media Library /wp-admin/upload.php2,392 ▲1,0046.10 ▲1.88114.78 ▲6.0444.99 ▲0.64
WP How to - WordPress Tutorial Videos /wp-admin/admin.php?page=how-to-wp2,71414.44241.2548.24
Freemius Debug [v.2.4.5] /wp-admin/admin.php?page=freemius2,77914.58221.0528.55

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/how-to-wp/freemius/includes/class-freemius.php+8575
    Undefined property: stdClass::$plugins
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_wp_how_to_favs
  • The uninstall procedure has failed, leaving 11 options in the database
    • widget_recent-posts
    • fs_debug_mode
    • can_compress_scripts
    • fs_accounts
    • fs_active_plugins
    • widget_theysaidso_widget
    • widget_recent-comments
    • fs_gdpr
    • wp_how_to_favs_db_version
    • theysaidso_admin_options
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/how-to-wp/assets/admin/partials/slide-in-section.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Other (warning) in unknown
    https://www.youtube.com/s/player/4a66ccde/www-widgetapi.vflset/www-widgetapi.js 1232 Unrecognized feature: 'web-share'.

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: diy, how to, help, wordpress plugins, video...

how-to-wp/how-to-wp.php 92% from 13 tests

The main PHP script in "WP How to - WordPress Tutorial Videos" version 1.0.2 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 358 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected32,268 lines of code in 125 files:
LanguageFilesBlank linesComment linesLines of code
PHP1097,26216,15430,669
JavaScript4591931,292
CSS12484307

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 2,911)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity88.50
▷ Minimum class complexity1.00
▷ Maximum class complexity2,911.00
Average method complexity4.62
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes46
▷ Abstract classes24.35%
▷ Concrete classes4495.65%
▷ Final classes00.00%
Methods1,143
▷ Static methods17515.31%
▷ Public methods80370.25%
▷ Protected methods151.31%
▷ Private methods32528.43%
Functions95
▷ Named functions95100.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
9 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/img/iconmonstr-library-pink.png1.13KB0.88KB▼ 21.69%
assets/admin/img/icon-pink.png1.25KB1.29KB0.00%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
assets/admin/img/iconmonstr-settings-yellow.png1.09KB0.56KB▼ 48.79%
assets/admin/img/iconmonstr-settings-pink.png1.07KB0.52KB▼ 51.69%