84% thats-why

Code Review | That's Why

WordPress plugin That's Why scored84%from 54 tests.

About plugin

  • Plugin page: thats-why
  • Plugin version: 1.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.6
  • WordPress version: 6.3.1
  • First release: Jan 5, 2021
  • Latest release: Jun 29, 2021
  • Number of updates: 8
  • Update frequency: every 22.6 days
  • Top authors: astronatic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /492 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼12.03ms] Passed 4 tests

Analyzing server-side resources used by That's Why
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0341.35 ▲1.66
Dashboard /wp-admin3.35 ▲0.0047.56 ▼26.79
Posts /wp-admin/edit.php3.41 ▲0.0448.46 ▼5.50
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.02 ▼17.47
Media Library /wp-admin/upload.php3.28 ▲0.0439.05 ▲2.31
That's Why /wp-admin/options-general.php?page=thatswhy3.2433.91

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 7 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

An overview of browser requirements for That's Why
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.06 ▼0.291.66 ▲0.1143.79 ▲4.01
Dashboard /wp-admin2,199 ▲225.58 ▲0.0085.25 ▼4.9341.85 ▲0.25
Posts /wp-admin/edit.php2,104 ▲11.99 ▼0.0440.63 ▲0.6335.89 ▲0.17
Add New Post /wp-admin/post-new.php1,531 ▲322.80 ▼0.48672.97 ▼46.6053.79 ▲2.18
Media Library /wp-admin/upload.php1,404 ▲44.23 ▲0.04111.58 ▼2.5948.49 ▼0.47
That's Why /wp-admin/options-general.php?page=thatswhy8032.1526.2628.39

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/thats-why/thatswhy.php:215

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: webperformance, real user monitoring, thats why

thats-why/thatswhy.php 92% from 13 tests

The main PHP script in "That's Why" version 1.7 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("thats-why.php" instead of "thatswhy.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin153 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP13769117
Markdown218031
SVG1005

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
thatswhy.png9.78KB3.33KB▼ 65.93%