78% html-post-editor-new

Code Review | HTML Post Editor

WordPress plugin HTML Post Editor scored 78% from 54 tests.

About plugin

  • Plugin page: html-post-editor-new
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.1
  • WordPress version: 6.3.1
  • First release: Apr 9, 2015
  • Latest release: May 13, 2015
  • Number of updates: 12
  • Update frequency: every 3.8 days
  • Top authors: mortalis (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active / 14,120 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

A check of server-side resources used by HTML Post Editor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.92 ▼5.76
Dashboard /wp-admin3.33 ▲0.0347.38 ▼1.87
Posts /wp-admin/edit.php3.38 ▲0.0344.46 ▼0.02
Add New Post /wp-admin/post-new.php5.94 ▲0.0591.99 ▲0.27
Media Library /wp-admin/upload.php3.25 ▲0.0332.76 ▼0.82
HTML Post Editor /wp-admin/options-general.php?page=html-post-editor3.2232.45

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 55 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for HTML Post Editor
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.40 ▼0.971.71 ▼0.3456.08 ▲10.12
Dashboard /wp-admin2,210 ▲225.82 ▼0.0498.14 ▼16.8937.31 ▼6.15
Posts /wp-admin/edit.php2,072 ▼172.01 ▲0.0133.86 ▼1.9533.34 ▼0.59
Add New Post /wp-admin/post-new.php1,736 ▲20724.00 ▲5.71627.34 ▲11.4234.37 ▼24.99
Media Library /wp-admin/upload.php1,392 ▲14.19 ▼0.0295.29 ▼5.6242.49 ▼5.09
HTML Post Editor /wp-admin/options-general.php?page=html-post-editor8652.5935.3825.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

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
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/html-post-editor-new/options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/html-post-editor-new/html-post-editor.php:140

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=html-post-editor
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Array.forEach is not a function" "TypeError: Array.forEach is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/html-post-editor-new/js/options.js?ver=1.0.0:92:11)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=html-post-editor
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: Array.forEach is not a function

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt is a good inspiration

html-post-editor-new/html-post-editor.php 92% from 13 tests

The principal PHP file in "HTML Post Editor" v. 1.0.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("html-post-editor-new.php" instead of "html-post-editor.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin24,492 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript484,0383,77124,256
CSS4137142
PHP2304894

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.24
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin