70% tidy-head-tag

Code Review | Tidy Head Tag

WordPress plugin Tidy Head Tag scored70%from 54 tests.

About plugin

  • Plugin page: tidy-head-tag
  • Plugin version: 1.3.0
  • PHP compatiblity: 7.3.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7.1-5.7.1
  • WordPress version: 6.3.1
  • First release: Apr 28, 2021
  • Latest release: May 12, 2021
  • Number of updates: 24
  • Update frequency: every 0.6 days
  • Top authors: suginoki45 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /442 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.55ms] Passed 4 tests

An overview of server-side resources used by Tidy Head Tag
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0742.94 ▲5.72
Dashboard /wp-admin3.36 ▲0.0148.34 ▼12.85
Posts /wp-admin/edit.php3.47 ▲0.1150.76 ▲5.40
Add New Post /wp-admin/post-new.php5.94 ▲0.0584.49 ▼13.68
Media Library /wp-admin/upload.php3.28 ▲0.0539.45 ▼1.06
Tidy Head Tag /wp-admin/options-general.php?page=tidy-head-tag3.2434.23

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

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

Browser metrics Passed 4 tests

Tidy Head Tag: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.28 ▼1.125.37 ▲3.6739.96 ▼3.07
Dashboard /wp-admin2,210 ▲195.83 ▲0.9393.00 ▼7.7738.78 ▼6.35
Posts /wp-admin/edit.php2,093 ▲12.03 ▼0.0239.17 ▲3.1140.08 ▲3.71
Add New Post /wp-admin/post-new.php1,536 ▲223.18 ▼0.00615.79 ▼53.0852.94 ▼9.06
Media Library /wp-admin/upload.php1,395 ▲74.20 ▼0.0494.72 ▼11.9841.67 ▼4.90
Tidy Head Tag /wp-admin/options-general.php?page=tidy-head-tag9282.0324.3034.39

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Warning in wp-content/plugins/tidy-head-tag/uninstall.php+15
    require_once(wp-content/plugins/tidy-head-tag/includes/class-tidy-head-tag-data.php): failed to open stream: No such file or directory
  • The plugin did not uninstall successfully, leaving 10 files (0.02MB) in the plugin directory
    • (new file) languages/tidy-head-tag.pot
    • (new file) languages/tidy-head-tag-ja.mo
    • (new file) includes/class-tidy-head-tag-front.php
    • (new file) includes/class-tidy-head-tag-admin.php
    • (new file) readme.txt
    • (new file) includes/class-tidy-head-tag-i18n.php
    • (new file) languages/tidy-head-tag-ja.po
    • (new file) tidy-head-tag.php
    • (new file) includes/class-tidy-head-tag.php
    • (new file) uninstall.php
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • recovery_mode_email_last_sent
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: head, header, meta, wp_head

tidy-head-tag/tidy-head-tag.php Passed 13 tests

Analyzing the main PHP file in "Tidy Head Tag" version 1.3.0
60 characters long description:
Organize the head tags that WordPress automatically outputs.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin308 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP640175231
PO File1263177

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods981.82%
▷ Protected methods00.00%
▷ Private methods218.18%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.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
There were not PNG files found in your plugin