78% wonkasoft-logout

Code Review | Wonkasoft Logout

WordPress plugin Wonkasoft Logout scored78%from 54 tests.

About plugin

  • Plugin page: wonkasoft-logout
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3.2
  • WordPress version: 6.3.1
  • First release: Apr 23, 2018
  • Latest release: Jan 20, 2020
  • Number of updates: 16
  • Update frequency: every 39.8 days
  • Top authors: mrlister1 (68.75%)llister (37.5%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /648 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Wonkasoft Logout
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0840.12 ▼3.36
Dashboard /wp-admin3.40 ▲0.0948.69 ▼6.21
Posts /wp-admin/edit.php3.51 ▲0.1552.66 ▲5.53
Add New Post /wp-admin/post-new.php6.00 ▲0.1191.90 ▼7.31
Media Library /wp-admin/upload.php3.32 ▲0.0940.00 ▲4.45

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Wonkasoft Logout
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,948 ▲17713.61 ▼0.745.56 ▲3.4944.58 ▼3.78
Dashboard /wp-admin2,234 ▲465.85 ▼0.05105.34 ▼12.3772.59 ▲25.94
Posts /wp-admin/edit.php2,132 ▲462.02 ▼0.0036.74 ▼1.6233.20 ▼5.95
Add New Post /wp-admin/post-new.php1,548 ▲3423.10 ▲5.59739.90 ▲75.6459.58 ▲3.07
Media Library /wp-admin/upload.php1,425 ▲344.13 ▼0.00108.24 ▲6.0288.26 ▲45.13

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wonkasoft-logout/public/partials/wonkasoft-logout-public-display.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wonkasoft-logout/admin/partials/wonkasoft-logout-add-action-links.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wonkasoft-logout/admin/partials/wonkasoft-logout-admin-display.php:18

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

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Requires php: Version format is invalid
The official readme.txt might help

wonkasoft-logout/wonkasoft-logout.php Passed 13 tests

The main PHP script in "Wonkasoft Logout" version 1.1.2 is automatically included on every request by WordPress
125 characters long description:
This Plugin will allow you to direct where the user will go after either logging in or logging out of an account on the site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin396 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP13189635369
CSS24818
JavaScript24546
SVG3003

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity3.86
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity1.66
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods30
▷ Static methods26.67%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
2 compressed PNG files occupy 0.03MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/Logo-8.png13.70KB12.33KB▼ 9.98%
admin/img/Logo_rec-8.png13.24KB12.12KB▼ 8.46%