10% wp-whoosh

Code Review | WP Whoosh

WordPress plugin WP Whoosh scored 10% from 54 tests.

About plugin

  • Plugin page: wp-whoosh
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6
  • WordPress version: 6.3.1
  • First release: Jan 11, 2013
  • Latest release: Aug 21, 2013
  • Number of updates: 18
  • Update frequency: every 13.0 days
  • Top authors: powerblogservice (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

10+ active / 3,486 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/wp-whoosh/updater.php+270
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▲0.10MB] [CPU: ▼4.33ms] Passed 4 tests

Analyzing server-side resources used by WP Whoosh
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.52 ▼5.17
Dashboard /wp-admin3.43 ▲0.1346.48 ▼2.87
Posts /wp-admin/edit.php3.54 ▲0.1947.87 ▼4.87
Add New Post /wp-admin/post-new.php6.01 ▲0.1391.15 ▼4.39
Media Library /wp-admin/upload.php3.35 ▲0.1235.42 ▲1.85
API Key /wp-admin/admin.php?page=wpwhoosh_key3.3129.85
Credits /wp-admin/admin.php?page=wpwhoosh_credits3.3331.64
Intro (v1.6) /wp-admin/admin.php?page=wpwhoosh3.3332.03
Hosts /wp-admin/admin.php?page=wpwhoosh_hosts3.3532.75
Templates /wp-admin/admin.php?page=wpwhoosh_templates3.3339.37
API Secret /wp-admin/admin.php?page=wpwhoosh_secret3.3128.44

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

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

Browser metrics Passed 4 tests

WP Whoosh: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲10513.24 ▼1.061.74 ▲0.0742.01 ▲3.36
Dashboard /wp-admin2,245 ▲605.84 ▲0.02100.52 ▼6.3372.15 ▲27.43
Posts /wp-admin/edit.php2,128 ▲362.02 ▲0.0238.29 ▼2.0534.59 ▼2.01
Add New Post /wp-admin/post-new.php1,548 ▲2817.80 ▼5.45723.62 ▲89.8552.23 ▼10.72
Media Library /wp-admin/upload.php1,430 ▲424.06 ▼0.1695.84 ▼4.5667.41 ▲25.42
API Key /wp-admin/admin.php?page=wpwhoosh_key1,0912.3336.3341.96
Credits /wp-admin/admin.php?page=wpwhoosh_credits9902.0836.6024.87
Intro (v1.6) /wp-admin/admin.php?page=wpwhoosh9452.0124.9326.95
Hosts /wp-admin/admin.php?page=wpwhoosh_hosts1,0682.4234.3729.97
Templates /wp-admin/admin.php?page=wpwhoosh_templates1,0122.1035.6230.88
API Secret /wp-admin/admin.php?page=wpwhoosh_secret1,0792.2335.6033.26

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpwhoosh_secret
    • > Notice in wp-content/plugins/wp-whoosh/secret.php+216
    Undefined index: action

SRP 50% 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
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'wpwhoosh_list' not found in wp-content/plugins/wp-whoosh/sites.php:1080
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-whoosh/site-list-table.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-whoosh/main.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'wpwhoosh_list' not found in wp-content/plugins/wp-whoosh/hosts.php:619
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/wp-whoosh/host-list-table.php on line 10
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-whoosh/host-list-table.php on line 10
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-whoosh/site-list-table.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-whoosh/public.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-whoosh/admin.php:2
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/wp-whoosh/site-list-table.php on line 2

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 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots need descriptions #2, #3, #4, #5 in wp-whoosh/assets to your readme.txt
You can take inspiration from this readme.txt

wp-whoosh/main.php 92% from 13 tests

The main PHP file in "WP Whoosh" ver. 1.6 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-whoosh.php" instead of "main.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
There were no executable files found in this plugin4,813 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP16409433,868
JavaScript106294658
CSS8212287

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity42.68
▷ Minimum class complexity1.00
▷ Maximum class complexity176.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods349
▷ Static methods29283.67%
▷ Public methods25974.21%
▷ Protected methods00.00%
▷ Private methods9025.79%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants25
▷ Global constants2080.00%
▷ Class constants520.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
12 PNG files occupy 0.19MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/get-api-key.png17.68KB8.30KB▼ 53.09%
images/tick.png0.52KB0.52KB0.00%
images/cross-32.png3.23KB1.59KB▼ 50.71%
images/install.png1.73KB1.33KB▼ 22.82%
images/cross.png0.64KB0.72KB0.00%