62% tidyro

Code Review | Tidy.ro

WordPress plugin Tidy.ro scored62%from 54 tests.

About plugin

  • Plugin page: tidyro
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Nov 14, 2014
  • Latest release: Nov 14, 2014
  • Number of updates: 2
  • Update frequency: every 5.0 days
  • Top authors: razvypp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /587 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.12MB] [CPU: ▼12.05ms] Passed 4 tests

A check of server-side resources used by Tidy.ro
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.63 ▲0.96
Dashboard /wp-admin3.26 ▼0.0935.14 ▼29.04
Posts /wp-admin/edit.php3.32 ▼0.0446.47 ▼2.91
Add New Post /wp-admin/post-new.php5.51 ▼0.3883.72 ▼13.62
Media Library /wp-admin/upload.php3.26 ▲0.0337.21 ▼2.62
Statistics /wp-admin/admin.php?page=tidy-statistics3.2330.84
tidy.ro /wp-admin/admin.php?page=tidy3.2335.09

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 39 new files
Database: 1 new table, 9 new options
New tables
wp_tidy_connections
New WordPress options
widget_recent-comments
td_atc_settings
can_compress_scripts
td_current_version
td_message
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Tidy.ro
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,895 ▲14913.11 ▼1.074.91 ▲3.0233.51 ▼14.58
Dashboard /wp-admin2,279 ▲945.80 ▼0.06106.33 ▼2.7671.85 ▲26.22
Posts /wp-admin/edit.php2,172 ▲802.14 ▲0.1540.20 ▼1.5640.27 ▲5.18
Add New Post /wp-admin/post-new.php1,584 ▲5123.29 ▲0.06704.71 ▲23.8156.79 ▼0.06
Media Library /wp-admin/upload.php1,461 ▲734.14 ▼0.07102.84 ▼4.3878.97 ▲33.31
Statistics /wp-admin/admin.php?page=tidy-statistics8322.0224.6929.59
tidy.ro /wp-admin/admin.php?page=tidy8402.0328.5831.82

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_tidy_connections
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • td_message
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • td_current_version

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tidy
    • > Notice in wp-content/plugins/tidyro/tidy.php+62
    Undefined variable: answer
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tidy
    • > Notice in wp-content/plugins/tidyro/tidy.php+62
    Trying to get property 'message' of non-object

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
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/tidyro/tabs/main.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tidyro/tidy.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/tidyro/tabs/statistics.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tidy
    • > Network (severe)
    wp-content/plugins/tidy/chart/Chart.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tidy
    • > Network (severe)
    wp-content/plugins/tidy/icon.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === tidyro === )
Please take inspiration from this readme.txt

tidyro/tidy.php 92% from 13 tests

This is the main PHP file of "Tidy.ro" version 1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("tidyro.php" instead of "tidy.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected6,864 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript99987374,970
Markdown103280902
PHP341227664
HTML6390298
JSON20030

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.20MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icon.png1.54KB0.69KB▼ 55.37%
assets/screenshot-1.png39.46KB18.28KB▼ 53.68%
correct.png2.62KB1.37KB▼ 47.50%
assets/screenshot-2.png160.65KB71.83KB▼ 55.29%
transparent_bg.png0.90KB0.09KB▼ 89.71%