72% html-demos

Code Review | HTML Demos

WordPress plugin HTML Demos scored 72% from 54 tests.

About plugin

  • Plugin page: html-demos
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.4.2
  • WordPress version: 6.3.1
  • First release: Oct 2, 2012
  • Latest release: Oct 2, 2012
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: betzster (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,158 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.04MB] [CPU: ▼0.91ms] Passed 4 tests

Analyzing server-side resources used by HTML Demos
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0445.07 ▼2.85
Dashboard /wp-admin3.34 ▲0.0352.94 ▼1.15
Posts /wp-admin/edit.php3.39 ▲0.0453.57 ▲0.62
Add New Post /wp-admin/post-new.php5.94 ▲0.05106.24 ▲12.18
Media Library /wp-admin/upload.php3.26 ▲0.0337.48 ▼0.26
HTML Demos /wp-admin/edit.php?post_type=html_demos3.3139.03
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=html_demos3.2638.89
Add New /wp-admin/post-new.php?post_type=html_demos3.2849.07

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 209 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for HTML Demos
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,879 ▲9013.26 ▲0.034.92 ▲3.1342.22 ▼3.84
Dashboard /wp-admin2,257 ▲516.05 ▲1.20110.83 ▲0.8551.14 ▲9.57
Posts /wp-admin/edit.php2,140 ▲512.13 ▲0.1639.84 ▲0.4038.80 ▲2.49
Add New Post /wp-admin/post-new.php1,555 ▲1323.47 ▲5.15624.01 ▲35.2134.83 ▼19.11
Media Library /wp-admin/upload.php1,439 ▲544.22 ▲0.00108.97 ▼3.5042.86 ▼1.03
HTML Demos /wp-admin/edit.php?post_type=html_demos1,1632.1938.7330.40
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=html_demos1,3612.3734.2932.83
Add New /wp-admin/post-new.php?post_type=html_demos3,0853.3868.8351.43

Uninstaller [IO: ✅] [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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/post-new.php?post_type=html_demos
    • > Notice in wp-content/plugins/html-demos/html_examples.php+119
    Undefined variable: selected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/html-demos/html_examples.php:19

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=html_demos
    • > Javascript (severe) in unknown
    /wp-content/plugins/html-demos/CodeMirror/lib/codemirror.js?ver=6.3.1 2211:29 Uncaught TypeError: Cannot read properties of null (reading 'value')

Optimizations

Plugin configuration 96% from 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
No tags were detected

html-demos/html_examples.php 92% from 13 tests

This is the main PHP file of "HTML Demos" version 0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("html-demos.php" instead of "html_examples.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin29,333 lines of code in 196 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript871,8521,35218,592
HTML831,537269,727
CSS218944679
PHP14111154
SVG111151
JSON10021
Markdown1206
YAML1003

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
CodeMirror/doc/baboon.png22.75KB10.31KB▼ 54.68%