89% theme-structure-visualiser

Code Review | Theme Structure Visualiser

WordPress plugin Theme Structure Visualiser scored89%from 54 tests.

About plugin

  • Plugin page: theme-structure-v...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.9.1
  • WordPress version: 6.3.1
  • First release: Dec 15, 2017
  • Latest release: Dec 15, 2017
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: wpshades (80%)saurabhshukla (40%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /750 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.01MB] [CPU: ▲5.93ms] Passed 4 tests

A check of server-side resources used by Theme Structure Visualiser
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0634.01 ▼8.78
Dashboard /wp-admin3.33 ▲0.0258.44 ▲12.37
Posts /wp-admin/edit.php3.44 ▲0.0866.83 ▲18.16
Add New Post /wp-admin/post-new.php5.93 ▲0.04112.08 ▲7.88
Media Library /wp-admin/upload.php3.25 ▲0.0250.05 ▲12.24
TSV Options /wp-admin/options-general.php?page=theme-structure-visualiser/admin/class-admin-settings.php3.2241.62

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Theme Structure Visualiser
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,017 ▲28213.81 ▼0.506.95 ▲4.8738.30 ▼10.07
Dashboard /wp-admin2,226 ▲415.10 ▼0.76103.57 ▲8.0939.34 ▼2.73
Posts /wp-admin/edit.php2,114 ▲252.32 ▲0.3438.08 ▼1.9532.75 ▼3.54
Add New Post /wp-admin/post-new.php1,531 ▲1217.47 ▼5.88675.77 ▼10.1137.77 ▼12.41
Media Library /wp-admin/upload.php1,411 ▲204.44 ▲0.2498.44 ▼1.0240.86 ▼2.89
TSV Options /wp-admin/options-general.php?page=theme-structure-visualiser/admin/class-admin-settings.php1,0422.2544.5325.95

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

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

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: template parts, learning tools, templates, themes

theme-structure-visualiser/theme-structure-visualiser.php 92% from 13 tests

"Theme Structure Visualiser" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

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
Good job! No executable or dangerous file extensions detected362 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP4124310209
JavaScript5115117
JSON10027
XML1659

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity8.50
▷ Minimum class complexity7.00
▷ Maximum class complexity10.00
Average method complexity1.68
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.50MB with 0.34MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
org-assets/banner-772x250.png60.81KB20.39KB▼ 66.48%
org-assets/screenshot-2.png57.19KB19.71KB▼ 65.53%
org-assets/banner-1544x500.png147.38KB45.92KB▼ 68.84%
org-assets/icon-128x128.png1.96KB0.75KB▼ 61.64%
org-assets/icon-256x256.png3.88KB1.07KB▼ 72.47%