94% client-access

Code Review | Client Access

WordPress plugin Client Access scored 94% from 54 tests.

About plugin

  • Plugin page: client-access
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.2-4.2.4
  • WordPress version: 5.9.2
  • First release: Jul 27, 2015
  • Latest release: Sep 15, 2015
  • Number of updates: 10
  • Update frequency: every 5.3 days
  • Top authors: ZaneMatthew (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,497 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼295.12ms] Passed 4 tests

An overview of server-side resources used by Client Access
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1355.07 ▲3.06
Dashboard /wp-admin3.52 ▲0.1233.88 ▼0.00
Posts /wp-admin/edit.php3.75 ▲0.1137.17 ▼1.07
Add New Post /wp-admin/post-new.php7.05 ▲0.0894.03 ▼1,181.41
Media Library /wp-admin/upload.php3.47 ▲0.1825.07 ▲2.00
/wp-admin/index.php?page=update-client-access3.4725.60
/wp-admin/index.php?page=whats-new-client-access3.4824.52
Client Access /wp-admin/options-general.php?page=client_access3.4423.56
/wp-admin/index.php?page=about-client-access3.5027.65

Server storage [IO: ▲1.27MB] [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: 37 new files
Database: no new tables, 1 new option
New WordPress options
client_access_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for Client Access
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,911 ▲15716.64 ▲0.969.85 ▲1.292.17 ▼1.47
Dashboard /wp-admin2,902 ▲416.12 ▼0.08118.77 ▼21.81157.85 ▼2.04
Posts /wp-admin/edit.php2,702 ▲113.27 ▲0.0467.87 ▼3.39141.28 ▼14.24
Add New Post /wp-admin/post-new.php1,671 ▲1016.18 ▲0.14413.76 ▼5.53163.67 ▲3.02
Media Library /wp-admin/upload.php1,709 ▲85.57 ▲0.06141.25 ▼31.82191.06 ▲0.86
/wp-admin/index.php?page=update-client-access1,0902.4252.48129.78
/wp-admin/index.php?page=whats-new-client-access1,1192.4254.66165.19
Client Access /wp-admin/options-general.php?page=client_access1,1222.4259.80116.25
/wp-admin/index.php?page=about-client-access1,1942.4456.94154.77

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Please take a closer look at the following
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/client-access/welcome/about-client-access.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/client-access/src/AllowByIp/AllowByIp.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/client-access/settings.php:16
    • > PHP Warning
      Use of undefined constant CLIENT_ACCESS_URL - assumed 'CLIENT_ACCESS_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/client-access/welcome/about-client-access.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/client-access/src/AllowByRole/AllowByRole.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Lumber' not found in wp-content/plugins/client-access/lib/quilt/quilt.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/client-access/src/AllowByUniversalPassword/AllowByUniversalPassword.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/client-access/welcome/update-client-access.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_head() in wp-content/plugins/client-access/templates/client-access.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/client-access/client-access.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots need descriptions #2, #3, #4 in client-access/assets to your readme.txt
The official readme.txt might help

client-access/client-access.php Passed 13 tests

The main PHP script in "Client Access" version 1.0.2 is automatically included on every request by WordPress
43 characters long description:
Let your client see their work in progress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin2,984 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP129071,1342,121
CSS3533281
PO File17991255
Markdown3820241
JavaScript3391586

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity48.17
▷ Minimum class complexity14.00
▷ Maximum class complexity149.00
Average method complexity3.30
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes116.67%
▷ Concrete classes583.33%
▷ Final classes00.00%
Methods123
▷ Static methods00.00%
▷ Public methods123100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
9 PNG files occupy 1.07MB with 0.62MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
welcome/assets/images/screenshot-notification-1.png169.41KB182.49KB0.00%
welcome/assets/images/screenshot-1.png167.12KB46.68KB▼ 72.07%
welcome/assets/images/screenshot-2.png160.35KB44.39KB▼ 72.32%
welcome/assets/images/screenshot-license-1.png147.95KB41.17KB▼ 72.17%
welcome/assets/images/screenshot-3.png166.03KB45.95KB▼ 72.32%