90% html-widget

Code Review | HTML Widget

WordPress plugin HTML Widget scored90%from 54 tests.

About plugin

  • Plugin page: html-widget
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.8
  • WordPress version: 6.3.1
  • First release: Jun 30, 2017
  • Latest release: Jun 30, 2017
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: seothemes (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

500+ active /4,961 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.14ms] Passed 4 tests

This is a short check of server-side resources used by HTML Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0341.22 ▼1.49
Dashboard /wp-admin3.34 ▲0.0349.26 ▼1.30
Posts /wp-admin/edit.php3.39 ▲0.0350.23 ▼3.84
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.59 ▼9.91
Media Library /wp-admin/upload.php3.26 ▲0.0339.79 ▲2.95

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_html-widget
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for HTML Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.17 ▼0.201.95 ▲0.0245.97 ▼3.84
Dashboard /wp-admin2,195 ▲155.57 ▼0.0995.54 ▼0.8243.77 ▼3.06
Posts /wp-admin/edit.php2,097 ▼32.02 ▲0.0137.73 ▲0.9633.47 ▼6.50
Add New Post /wp-admin/post-new.php1,526 ▼023.62 ▲0.42675.02 ▲0.0652.96 ▼3.65
Media Library /wp-admin/upload.php1,400 ▲34.19 ▲0.10102.81 ▼15.7845.40 ▼2.60

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_html-widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

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 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI ("seothemes.net/support")
The official readme.txt might help

html-widget/html-widget.php Passed 13 tests

"HTML Widget" version 0.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
90 characters long description:
Adds a simple HTML Code Widget with syntax highlighting for HTML, CSS and JavaScript code.

Code Analysis Passed 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 detected10,568 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript111,1691,11110,068
Sass3501353
PHP1218094
JSON10045
Markdown1607
CSS1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin