84% preserved-html-editor-markup-plus

Code Review | Preserved HTML Editor Markup Plus

WordPress plugin Preserved HTML Editor Markup Plus scored 84% from 54 tests.

About plugin

  • Plugin page: preserved-html-ed...
  • Plugin version: 1.5.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-5.3
  • WordPress version: 6.3.1
  • First release: Sep 23, 2014
  • Latest release: Dec 11, 2019
  • Number of updates: 38
  • Update frequency: every 50.1 days
  • Top authors: J-Ro (100%)

Code review

54 tests

User reviews

36 reviews

Install metrics

5,000+ active / 43,996 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.26MB] [CPU: ▼15.05ms] Passed 4 tests

A check of server-side resources used by Preserved HTML Editor Markup Plus
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0047.94 ▼5.08
Dashboard /wp-admin3.31 ▲0.0156.79 ▲7.05
Posts /wp-admin/edit.php3.36 ▲0.0152.21 ▼0.43
Add New Post /wp-admin/post-new.php4.83 ▼1.0680.39 ▼58.12
Media Library /wp-admin/upload.php3.24 ▲0.0146.02 ▲3.45

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
emc2pm_activate_date
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Preserved HTML Editor Markup Plus
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲7914.77 ▲1.272.27 ▼13.14160.15 ▲27.80
Dashboard /wp-admin2,202 ▲266.04 ▲0.17223.33 ▲27.50148.05 ▲70.14
Posts /wp-admin/edit.php2,097 ▲82.04 ▼0.0164.26 ▼30.15100.45 ▼20.09
Add New Post /wp-admin/post-new.php1,411 ▼9617.37 ▼4.60855.93 ▲61.40161.41 ▲5.27
Media Library /wp-admin/upload.php1,381 ▼44.16 ▼0.08374.67 ▲164.03234.90 ▲137.84

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 detected upon uninstall: 7 options
    • db_upgraded
    • widget_recent-comments
    • emc2pm_activate_date
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/preserved-html-editor-markup-plus/preserved_markup_plus.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (No screenshots) image required
The official readme.txt is a good inspiration

preserved-html-editor-markup-plus/preserved_markup_plus.php 92% from 13 tests

The principal PHP file in "Preserved HTML Editor Markup Plus" v. 1.5.4 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("preserved-html-editor-markup-plus.php" instead of "preserved_markup_plus.php")

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
Everything looks great! No dangerous files found in this plugin549 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP18198272
JavaScript15264218
Bourne Shell119859

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods18100.00%
▷ Public methods18100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected