74% remove-html-from-content

Code Review | Remove HTML From Content

WordPress plugin Remove HTML From Content scored74%from 54 tests.

About plugin

  • Plugin page: remove-html-from-...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8
  • WordPress version: 6.3.1
  • First release: Jun 4, 2015
  • Latest release: Oct 26, 2021
  • Number of updates: 5
  • Update frequency: every 467.8 days
  • Top authors: adam.ainsworth (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,874 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.85ms] Passed 4 tests

Analyzing server-side resources used by Remove HTML From Content
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.62 ▼4.18
Dashboard /wp-admin3.32 ▼0.0350.43 ▼16.30
Posts /wp-admin/edit.php3.37 ▲0.0154.84 ▲2.01
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.06 ▼11.87
Media Library /wp-admin/upload.php3.24 ▲0.0141.10 ▲0.94

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Remove HTML From Content
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.73 ▲0.431.87 ▼0.1641.18 ▼2.46
Dashboard /wp-admin2,206 ▲215.83 ▼0.03101.26 ▼8.0742.56 ▼1.20
Posts /wp-admin/edit.php2,089 ▲32.01 ▼0.0334.16 ▼0.6134.01 ▼7.17
Add New Post /wp-admin/post-new.php1,514 ▼517.64 ▼5.55658.67 ▼38.9252.91 ▼14.86
Media Library /wp-admin/upload.php1,382 ▼64.29 ▲0.0598.44 ▼12.8344.56 ▼1.74

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/remove-html-from-content/remove-html-from-content.php+50
    Use of undefined constant WP_UNINSTALL_PLUGIN - assumed 'WP_UNINSTALL_PLUGIN' (this will throw an Error in a future version of PHP)
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/remove-html-from-content/remove-html-from-content.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: strip, html, tags, clean

remove-html-from-content/remove-html-from-content.php 92% from 13 tests

The entry point to "Remove HTML From Content" version 1.0.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin51 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2122151

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods583.33%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
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
There were not PNG files found in your plugin