84% wp-cas-server

Code Review | Cassava CAS Server

WordPress plugin Cassava CAS Server scored 84% from 54 tests.

About plugin

  • Plugin page: wp-cas-server
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.4.2
  • WordPress version: 5.8.1
  • First release: Apr 30, 2014
  • Latest release: Feb 13, 2016
  • Number of updates: 23
  • Update frequency: every 28.5 days
  • Top authors: goblindegook (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active / 2,152 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼143.41ms] Passed 4 tests

Analyzing server-side resources used by Cassava CAS Server
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.96 ▲0.1237.98 ▲10.39
Dashboard /wp-admin3.28 ▲0.2347.38 ▼4.09
Posts /wp-admin/edit.php3.33 ▲0.2347.44 ▲0.42
Add New Post /wp-admin/post-new.php5.58 ▲0.1591.34 ▼570.62
Media Library /wp-admin/upload.php3.16 ▲0.1633.53 ▲0.65
Cassava CAS Server /wp-admin/options-general.php?page=wp-cas-server3.1328.98

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 41 new files
Database: no new tables, 1 new option
New WordPress options
wp_cas_server

Browser metrics Passed 4 tests

An overview of browser requirements for Cassava CAS Server
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,689 ▲9315.98 ▲0.069.84 ▼0.9148.01 ▲3.20
Dashboard /wp-admin2,980 ▲465.90 ▼0.10148.57 ▼17.89111.44 ▼4.64
Posts /wp-admin/edit.php2,751 ▲122.70 ▼0.0165.23 ▼5.3681.70 ▼8.48
Add New Post /wp-admin/post-new.php1,689 ▲18918.74 ▼0.15387.87 ▼11.22109.02 ▲1.11
Media Library /wp-admin/upload.php1,820 ▲725.04 ▲0.06160.14 ▲12.52117.03 ▲0.63
Cassava CAS Server /wp-admin/options-general.php?page=wp-cas-server1,1422.1359.9573.37

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options were found after uninstall: 1 option
    • wp_cas_server

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
The smoke test was a success, however most plugin functionality was not tested

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
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Cassava\\CAS\\Response\\BaseResponse' not found in wp-content/plugins/wp-cas-server/lib/CAS/Response/ValidateResponse.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Cassava\\CAS\\Response\\BaseResponse' not found in wp-content/plugins/wp-cas-server/lib/CAS/Response/ProxyResponse.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Cassava\\Exception\\GeneralException' not found in wp-content/plugins/wp-cas-server/lib/Exception/TicketException.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Cassava\\CAS\\Controller\\BaseController' not found in wp-content/plugins/wp-cas-server/lib/CAS/Controller/ValidateController.php:48
    • > PHP Fatal error
      Uncaught Error: Class 'Cassava\\CAS\\Controller\\ValidateController' not found in wp-content/plugins/wp-cas-server/lib/CAS/Controller/ProxyController.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Cassava\\CAS\\Controller\\BaseController' not found in wp-content/plugins/wp-cas-server/lib/CAS/Controller/LogoutController.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'Cassava\\CAS\\Controller\\BaseController' not found in wp-content/plugins/wp-cas-server/lib/CAS/Controller/LoginController.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Cassava\\CAS\\Controller\\ServiceValidateController' not found in wp-content/plugins/wp-cas-server/lib/CAS/Controller/ProxyValidateController.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Cassava\\Exception\\GeneralException' not found in wp-content/plugins/wp-cas-server/lib/Exception/RequestException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Cassava\\CAS\\Controller\\ValidateController' not found in wp-content/plugins/wp-cas-server/lib/CAS/Controller/ServiceValidateController.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: sso, single sign-on, jasig cas, central authentication service, cas...

wp-cas-server/wp-cas-server.php Passed 13 tests

The entry point to "Cassava CAS Server" version 1.2.3 is a PHP file that has certain tags in its header comment area
65 characters long description:
Provides authentication services based on the Jasig CAS protocol.

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
Success! There were no dangerous files found in this plugin1,358 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP284481,3891,262
PO File1394795
JSON1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity9.00
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes21
▷ Abstract classes14.76%
▷ Concrete classes2095.24%
▷ Final classes00.00%
Methods99
▷ Static methods1010.10%
▷ Public methods8080.81%
▷ Protected methods1212.12%
▷ Private methods77.07%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants21
▷ Global constants14.76%
▷ Class constants2095.24%
▷ Public constants20100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin