84% html-tag-and-class-replace

Code Review | HTML Tag and Class Replace

WordPress plugin HTML Tag and Class Replace scored84%from 54 tests.

About plugin

  • Plugin page: html-tag-and-clas...
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Oct 26, 2021
  • Latest release: Nov 9, 2023
  • Number of updates: 12
  • Update frequency: every 62.0 days
  • Top authors: jahidcse (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /2,873 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.33ms] Passed 4 tests

Server-side resources used by HTML Tag and Class Replace
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.95 ▼1.13
Dashboard /wp-admin3.33 ▲0.0245.04 ▼4.42
Posts /wp-admin/edit.php3.38 ▲0.0245.70 ▼6.56
Add New Post /wp-admin/post-new.php5.91 ▲0.0293.35 ▼1.20
Media Library /wp-admin/upload.php3.25 ▲0.0234.49 ▲2.70
Tag and Class Replace /wp-admin/options-general.php?page=html-tag-and-class-replace3.2733.26

Server storage [IO: ▲0.10MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for HTML Tag and Class Replace
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲11813.42 ▼0.958.66 ▲7.0443.22 ▼3.12
Dashboard /wp-admin2,204 ▲245.54 ▼0.1385.30 ▼3.9937.40 ▼6.31
Posts /wp-admin/edit.php2,106 ▲62.00 ▲0.0538.60 ▼0.6335.06 ▲1.25
Add New Post /wp-admin/post-new.php1,531 ▼023.22 ▲0.46633.31 ▼65.3545.26 ▼6.50
Media Library /wp-admin/upload.php1,406 ▲64.19 ▼0.0498.29 ▲2.2341.58 ▲1.08
Tag and Class Replace /wp-admin/options-general.php?page=html-tag-and-class-replace8821.9921.8532.83

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/html-tag-and-class-replace/view/deshboard.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_file_data() in wp-content/plugins/html-tag-and-class-replace/html-tag-and-class-replace.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt might help

html-tag-and-class-replace/html-tag-and-class-replace.php Passed 13 tests

The main PHP script in "HTML Tag and Class Replace" version 1.0.4 is automatically included on every request by WordPress
71 characters long description:
Allows you to Replace any HTML Tag and Class of your WordPress WebSite.

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
Everything looks great! No dangerous files found in this plugin2,052 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP64296701,689
Markdown1820255
CSS15051
JSON10045
JavaScript14012

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity40.60
▷ Minimum class complexity8.00
▷ Maximum class complexity86.00
Average method complexity3.02
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods98
▷ Static methods11.02%
▷ Public methods6465.31%
▷ Protected methods66.12%
▷ Private methods2828.57%
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
PNG images were not found in this plugin