84% temporary-access-for-users

Code Review | Temporary Access for users

WordPress plugin Temporary Access for users scored84%from 54 tests.

About plugin

  • Plugin page: temporary-access-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4.2
  • WordPress version: 6.3.1
  • First release: Apr 26, 2017
  • Latest release: Jul 6, 2020
  • Number of updates: 10
  • Update frequency: every 116.7 days
  • Top authors: sagarprajapati (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,531 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.07MB] [CPU: ▼3.84ms] Passed 4 tests

An overview of server-side resources used by Temporary Access for users
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0837.89 ▼4.82
Dashboard /wp-admin3.38 ▲0.0348.47 ▼13.56
Posts /wp-admin/edit.php3.49 ▲0.1448.82 ▼0.94
Add New Post /wp-admin/post-new.php5.98 ▲0.09132.08 ▲18.12
Media Library /wp-admin/upload.php3.30 ▲0.0742.50 ▲3.97

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

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

Browser metrics Passed 4 tests

Temporary Access for users: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲14813.64 ▼0.735.60 ▲3.7338.70 ▼3.82
Dashboard /wp-admin2,235 ▲344.93 ▼0.02109.94 ▲0.6847.79 ▲4.24
Posts /wp-admin/edit.php2,115 ▲122.10 ▲0.0638.20 ▲3.0333.50 ▼2.25
Add New Post /wp-admin/post-new.php1,536 ▲523.38 ▲0.37679.90 ▲62.2060.17 ▲4.24
Media Library /wp-admin/upload.php1,414 ▲144.29 ▼0.0299.58 ▼1.6243.62 ▼4.19

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
Please take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/temporary-access-for-users/admin/partials/temporary-access-for-users-admin-display.php
    • > /wp-content/plugins/temporary-access-for-users/public/partials/temporary-access-for-users-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 16 tag instead of maximum 10
Please take inspiration from this readme.txt

temporary-access-for-users/temporary-access-for-users.php Passed 13 tests

The principal PHP file in "Temporary Access for users" v. 1.0.0 is loaded by WordPress automatically on each request
56 characters long description:
This plugin is used for provide temporary access to user

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected254 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12136579247
JavaScript25547
CSS2080

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity3.14
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.52
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected