89% view-admin-as

Code Review | View Admin As

WordPress plugin View Admin As scored89%from 54 tests.

About plugin

  • Plugin page: view-admin-as
  • Plugin version: 1.8.8
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.1
  • WordPress version: 6.3.1
  • First release: Sep 28, 2015
  • Latest release: Jun 8, 2023
  • Number of updates: 154
  • Update frequency: every 18.4 days
  • Top authors: keraweb (100%)

Code review

54 tests

User reviews

44 reviews

Install metrics

8,000+ active /82,412 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: ▲2.05MB] [CPU: ▲19.82ms] Passed 4 tests

This is a short check of server-side resources used by View Admin As
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /5.60 ▲2.1462.41 ▲17.42
Dashboard /wp-admin5.35 ▲2.0582.33 ▲25.75
Posts /wp-admin/edit.php5.41 ▲2.0571.93 ▲20.65
Add New Post /wp-admin/post-new.php7.95 ▲2.07118.97 ▲16.09
Media Library /wp-admin/upload.php5.27 ▲2.0462.03 ▲25.13

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 47 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
vaa_view_admin_as
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by View Admin As
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,436 ▲1,69014.54 ▲0.1315.67 ▲13.8140.02 ▼4.64
Dashboard /wp-admin2,926 ▲7355.21 ▲0.35133.78 ▲19.2142.61 ▼2.24
Posts /wp-admin/edit.php2,812 ▲7202.19 ▲0.1854.81 ▲17.3435.27 ▲0.96
Add New Post /wp-admin/post-new.php2,227 ▲69323.47 ▲0.40664.65 ▲6.3654.30 ▲3.40
Media Library /wp-admin/upload.php2,105 ▲7144.49 ▲0.28116.81 ▲15.7144.71 ▲1.23

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 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 Passed 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
Congratulations! This plugin passed the SRP test

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

readme.txt 94% from 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
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt is a good inspiration

view-admin-as/view-admin-as.php 85% from 13 tests

This is the main PHP file of "View Admin As" version 1.8.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist
  • Description: The description should be shorter than 140 characters (currently 155 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected10,208 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP361,6687,4258,453
JavaScript21914231,389
CSS263107366

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity46.48
▷ Minimum class complexity7.00
▷ Maximum class complexity133.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes25
▷ Abstract classes416.00%
▷ Concrete classes2184.00%
▷ Final classes1466.67%
Methods458
▷ Static methods8017.47%
▷ Public methods39786.68%
▷ Protected methods439.39%
▷ Private methods183.93%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants14100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin