78% html-page-editor

Code Review | HTML Page Editor

WordPress plugin HTML Page Editor scored78%from 54 tests.

About plugin

  • Plugin page: html-page-editor
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.1
  • WordPress version: 6.3.1
  • First release: Oct 16, 2017
  • Latest release: Oct 16, 2017
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: lloan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Analyzing server-side resources used by HTML Page Editor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.81 ▼0.67
Dashboard /wp-admin3.39 ▲0.0442.04 ▼21.83
Posts /wp-admin/edit.php3.42 ▲0.0643.09 ▲1.95
Add New Post /wp-admin/post-new.php5.56 ▼0.3372.65 ▼30.19
Media Library /wp-admin/upload.php3.31 ▲0.0837.04 ▲5.04

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 82 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for HTML Page Editor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,247 ▲48614.60 ▲0.361.99 ▲0.2729.70 ▼13.89
Dashboard /wp-admin2,616 ▲4395.92 ▲0.3988.27 ▲0.2545.07 ▲8.69
Posts /wp-admin/edit.php2,536 ▲4362.44 ▲0.4834.92 ▼4.1632.43 ▼3.32
Add New Post /wp-admin/post-new.php2,112 ▲58423.06 ▲0.29697.39 ▲85.9966.42 ▲15.92
Media Library /wp-admin/upload.php1,830 ▲4334.59 ▲0.4497.94 ▲1.0546.72 ▲2.48

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% 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 output text when accessed directly:
    • > /wp-content/plugins/html-page-editor/layout/editorToggles.php
    • > /wp-content/plugins/html-page-editor/wpas.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/html-page-editor/init.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/html-page-editor/index.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/html-page-editor/resources.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/html-page-editor/layout/editorTools.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/html-page-editor/init.php:50

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% 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
4 plugin tags: custom editor, dev tool, page editor, html editor

html-page-editor/index.php 92% from 13 tests

The main PHP script in "HTML Page Editor" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("html-page-editor.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected66,116 lines of code in 71 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript476,1579,91560,771
SVG1002,671
CSS16241902,066
PHP711352608

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/wpas_logo.png8.71KB4.99KB▼ 42.67%
img/wpas_logo_vertical.png10.02KB5.64KB▼ 43.69%