79% tidyoutput

Code Review | Tidy Output

WordPress plugin Tidy Output scored79%from 54 tests.

About plugin

  • Plugin page: tidyoutput
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 6.3.1
  • First release: Nov 17, 2015
  • Latest release: Feb 7, 2016
  • Number of updates: 60
  • Update frequency: every 1.4 days
  • Top authors: curquhart (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,459 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by Tidy Output
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.58 ▲2.87
Dashboard /wp-admin3.32 ▲0.0255.42 ▲7.78
Posts /wp-admin/edit.php3.37 ▲0.0247.67 ▲0.47
Add New Post /wp-admin/post-new.php5.90 ▲0.0281.53 ▼15.92
Media Library /wp-admin/upload.php3.25 ▲0.0236.46 ▲0.59
Tidy Output /wp-admin/options-general.php?page=tidyoutput3.2531.44

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Tidy Output: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.72 ▲0.121.75 ▲0.1143.40 ▼0.70
Dashboard /wp-admin2,196 ▲195.58 ▲0.0494.56 ▲6.8442.81 ▲4.00
Posts /wp-admin/edit.php2,104 ▲42.04 ▲0.0632.65 ▼10.2238.20 ▼0.06
Add New Post /wp-admin/post-new.php1,529 ▲123.44 ▲0.36689.60 ▲62.1350.80 ▲1.31
Media Library /wp-admin/upload.php1,407 ▲44.21 ▲0.0497.43 ▼1.3543.92 ▼1.02
Tidy Output /wp-admin/options-general.php?page=tidyoutput1,1552.0423.2527.50

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: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/tidyoutput/views/settings_form.js.php
  • 23× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/tidyoutput/views/fields/boolean.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/tidyoutput/tests/test_extra_indent.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/tidyoutput/tests/test_template.php:32
    • > PHP Notice
      Undefined variable: field in wp-content/plugins/tidyoutput/views/fields/boolean.php on line 5
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/tidyoutput/tests/bootstrap.php on line 8
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/tidyoutput/views/fields/boolean.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/tidyoutput/views/fields/select.php:1
    • > PHP Notice
      Undefined variable: field in wp-content/plugins/tidyoutput/views/fields/boolean.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/tidyoutput/tests/bootstrap.php on line 8
    • > PHP Warning
      array_walk() expects parameter 1 to be array, null given in wp-content/plugins/tidyoutput/views/fields/range.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: html sanitization, cleanup, formatting

tidyoutput/tidyoutput.php Passed 13 tests

The main PHP script in "Tidy Output" version 1.0.2 is automatically included on every request by WordPress
40 characters long description:
A plugin designed to cleanup HTML output

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected1,417 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP233585151,083
PO File24436199
Bourne Shell120694
YAML16018
XML10014
Markdown1309

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity9.00
▷ Minimum class complexity1.00
▷ Maximum class complexity94.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces1
Interfaces1
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods73
▷ Static methods45.48%
▷ Public methods6994.52%
▷ Protected methods45.48%
▷ Private methods00.00%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants17
▷ Global constants15.88%
▷ Class constants1694.12%
▷ Public constants16100.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
PNG images were not found in this plugin