83% whook-security

Code Review | Whook Security

WordPress plugin Whook Security scored 83% from 54 tests.

About plugin

  • Plugin page: whook-security
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.5
  • WordPress version: 6.3.1
  • First release: Mar 27, 2018
  • Latest release: Apr 12, 2018
  • Number of updates: 40
  • Update frequency: every 0.4 days
  • Top authors: darteweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 946 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.05MB] [CPU: ▼4.02ms] Passed 4 tests

Analyzing server-side resources used by Whook Security
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.31 ▼2.13
Dashboard /wp-admin3.36 ▲0.05378.88 ▲333.99
Posts /wp-admin/edit.php3.41 ▲0.0545.55 ▼2.43
Add New Post /wp-admin/post-new.php5.96 ▲0.0783.13 ▼11.29
Media Library /wp-admin/upload.php3.28 ▲0.0532.38 ▼0.21

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Whook Security
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,877 ▲12014.55 ▲0.171.81 ▼0.1835.12 ▼8.88
Dashboard /wp-admin2,271 ▲795.89 ▲0.93102.33 ▼8.0878.96 ▲36.38
Posts /wp-admin/edit.php2,097 ▲82.10 ▲0.0836.28 ▲0.1730.52 ▼5.76
Add New Post /wp-admin/post-new.php1,525 ▼817.82 ▼5.49667.68 ▼7.7167.42 ▲2.18
Media Library /wp-admin/upload.php1,399 ▲144.23 ▲0.0695.36 ▼21.0739.56 ▼10.11

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/whook-security/whook-security.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 83% 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 require attention: The official readme.txt might help

whook-security/whook-security.php 69% from 13 tests

The principal PHP file in "Whook Security" v. 1.3 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Domain Path: The domain path should use only dashes and lowercase characters ("")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Domain Path: The domain path should be prefixed with a forward slash character ("/")
  • Requires at least: Required version does not match the one declared in readme.txt ("3.4" instead of "3.0")

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 plugin357 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP25515238
JavaScript210062
CSS20057
HTML1100

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
5 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/exc.png1.13KB0.28KB▼ 75.32%
images/update.png1.36KB0.55KB▼ 59.14%
images/tooltip.png1.05KB0.16KB▼ 84.84%
images/check.png1.24KB0.41KB▼ 66.85%
images/close.png1.19KB0.31KB▼ 73.96%