74% hw-create-widget-content-template

Code Review | HW Create Widget Content Template

WordPress plugin HW Create Widget Content Template scored74%from 54 tests.

About plugin

  • Plugin page: hw-create-widget-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0.0-1.0.0
  • WordPress version: 6.3.1
  • First release: Sep 30, 2015
  • Latest release: Sep 30, 2015
  • Number of updates: 3
  • Update frequency: every 8.7 days
  • Top authors: hoangweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /810 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.32MB] [CPU: ▼1.42ms] Passed 4 tests

This is a short check of server-side resources used by HW Create Widget Content Template
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3139.94 ▼2.88
Dashboard /wp-admin3.68 ▲0.3447.90 ▼6.42
Posts /wp-admin/edit.php3.73 ▲0.3846.71 ▲0.24
Add New Post /wp-admin/post-new.php6.20 ▲0.31112.12 ▲21.91
Media Library /wp-admin/upload.php3.54 ▲0.3139.59 ▲3.40

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by HW Create Widget Content Template
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.36 ▼1.021.79 ▼0.2943.10 ▲2.90
Dashboard /wp-admin2,206 ▲185.80 ▲0.9099.48 ▲0.9041.65 ▼3.94
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0634.27 ▼8.3334.46 ▼3.61
Add New Post /wp-admin/post-new.php1,542 ▲2818.25 ▲0.78607.85 ▼71.8849.23 ▼1.41
Media Library /wp-admin/upload.php1,388 ▼34.27 ▲0.0597.20 ▲1.1441.95 ▲0.48

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

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 | 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hw-create-widget-content-template/functions.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Category' not found in wp-content/plugins/hw-create-widget-content-template/lib/admin-page-framework.min.php:7466

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Plugin Name: You should set the name of your plugin on the first line ( === hw-create-widget-content-template === )
You can look at the official readme.txt

hw-create-widget-content-template/hw-skin.php 92% from 13 tests

The main PHP file in "HW Create Widget Content Template" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("hw-create-widget-content-template.php" instead of "hw-skin.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Please make sure to remedy the following
  • Do not distribute dangerous files with your plugin
    • .chm - Compiled HTML Help File in Firefox, IE, Safari
      • wp-content/plugins/hw-create-widget-content-template/document.chm
8,425 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP62752,9698,348
JavaScript3165940
CSS23237

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity16.12
▷ Minimum class complexity1.00
▷ Maximum class complexity343.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity61.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes176
▷ Abstract classes7341.48%
▷ Concrete classes10358.52%
▷ Final classes32.91%
Methods1,023
▷ Static methods15214.86%
▷ Public methods64262.76%
▷ Protected methods23222.68%
▷ Private methods14914.57%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants20
▷ Global constants00.00%
▷ Class constants20100.00%
▷ Public constants20100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin