78% wp-masquerade

Code Review | WP Masquerade

WordPress plugin WP Masquerade scored 78% from 54 tests.

About plugin

  • Plugin page: wp-masquerade
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.1
  • WordPress version: 6.3.1
  • First release: Apr 29, 2015
  • Latest release: Apr 29, 2015
  • Number of updates: 2
  • Update frequency: every 3.0 days
  • Top authors: Swingline0 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

300+ active / 3,225 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.49ms] Passed 4 tests

Analyzing server-side resources used by WP Masquerade
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0635.84 ▼7.44
Dashboard /wp-admin3.36 ▲0.0646.32 ▼2.47
Posts /wp-admin/edit.php3.41 ▲0.0549.47 ▲8.38
Add New Post /wp-admin/post-new.php5.96 ▲0.0786.65 ▼2.73
Media Library /wp-admin/upload.php3.28 ▲0.0537.47 ▲2.70

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WP Masquerade
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲15213.37 ▼0.903.07 ▲0.9442.55 ▼6.00
Dashboard /wp-admin2,309 ▲1325.89 ▲0.0199.86 ▼6.7342.05 ▼0.28
Posts /wp-admin/edit.php2,168 ▲762.06 ▲0.0435.25 ▼5.2531.53 ▲0.55
Add New Post /wp-admin/post-new.php1,558 ▲2518.62 ▼4.59616.24 ▼31.4071.27 ▼7.12
Media Library /wp-admin/upload.php1,446 ▲584.25 ▲0.0998.32 ▼10.7843.75 ▲1.40

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-masquerade/partials/admin-bar-node.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_current_user() in wp-content/plugins/wp-masquerade/partials/active-notification.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (Showing the Masquerade Link in the User List)
You can look at the official readme.txt

wp-masquerade/masquerade.php 92% from 13 tests

The principal PHP file in "WP Masquerade" v. 1.1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-masquerade.php" instead of "masquerade.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 plugin6,474 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
HTML36403,167
JavaScript7189242,349
CSS77140746
PHP34523178
JSON20034

PHP code Passed 2 tests

An short overview of 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.47
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity3.58
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods18.33%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
6 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/chosen-sprite.png0.53KB0.88KB0.00%
vendor/chosen_v1.3.0/chosen-sprite@2x.png0.72KB0.83KB0.00%
vendor/chosen_v1.3.0/docsupport/chosen.png1.47KB2.08KB0.00%
vendor/chosen_v1.3.0/docsupport/oss-credit.png4.30KB3.26KB▼ 24.02%
css/chosen-sprite@2x.png0.72KB0.83KB0.00%