78% import-html-pages

Code Review | HTML Import 2

WordPress plugin HTML Import 2 scored78%from 54 tests.

About plugin

  • Plugin page: import-html-pages
  • Plugin version: 2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.6
  • WordPress version: 6.3.1
  • First release: Jul 31, 2009
  • Latest release: Aug 31, 2017
  • Number of updates: 148
  • Update frequency: every 20.0 days
  • Top authors: sillybean (100%)

Code review

54 tests

User reviews

32 reviews

Install metrics

9,000+ active /277,090 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.33MB] [CPU: ▼4.46ms] Passed 4 tests

An overview of server-side resources used by HTML Import 2
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3337.47 ▼2.21
Dashboard /wp-admin3.64 ▲0.3444.73 ▼6.88
Posts /wp-admin/edit.php3.75 ▲0.4048.70 ▲1.82
Add New Post /wp-admin/post-new.php6.22 ▲0.3382.67 ▼6.83
Media Library /wp-admin/upload.php3.56 ▲0.3437.37 ▼1.91

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for HTML Import 2
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5713.95 ▼0.411.81 ▲0.2141.78 ▼6.06
Dashboard /wp-admin2,196 ▲225.48 ▼0.2488.11 ▼11.5537.06 ▼12.78
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0234.97 ▼9.3634.02 ▼7.84
Add New Post /wp-admin/post-new.php1,531 ▲323.10 ▲0.23606.42 ▲13.4349.78 ▼4.41
Media Library /wp-admin/upload.php1,404 ▲44.19 ▼0.2394.33 ▼5.6441.94 ▼0.17
HTML Import /wp-admin/html-import.php260.420.0914.99

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Walker' not found in wp-content/plugins/import-html-pages/html-import-options.php:928
    • > PHP Fatal error
      Uncaught Error: Class 'Walker' not found in wp-content/plugins/import-html-pages/html-import-options.php:928

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/html-import.php
    • > Network (severe)
    wp-admin/html-import.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
8 plugin tags: static files, frontpage, word, import, taxonomies...

import-html-pages/html-import.php 85% from 13 tests

This is the main PHP file of "HTML Import 2" version 2.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("import-html-pages.php" instead of "html-import.php")
  • Description: The description should be shorter than 140 characters (currently 270 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected1,862 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP32551811,796
JavaScript14638
CSS10128

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity106.00
▷ Minimum class complexity3.00
▷ Maximum class complexity209.00
Average method complexity8.50
▷ Minimum method complexity1.00
▷ Maximum method complexity90.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods28
▷ Static methods00.00%
▷ Public methods28100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin