84% campusnet-authentication

Code Review | CampusNet Authentication

WordPress plugin CampusNet Authentication scored84%from 54 tests.

About plugin

  • Plugin page: campusnet-authent...
  • Plugin version: 0.2.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.7.1
  • WordPress version: 6.3.1
  • First release: Oct 12, 2013
  • Latest release: Sep 11, 2014
  • Number of updates: 11
  • Update frequency: every 30.5 days
  • Top authors: Tehnix (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /867 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.62ms] Passed 4 tests

A check of server-side resources used by CampusNet Authentication
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.08 ▼1.47
Dashboard /wp-admin3.34 ▼0.0144.38 ▼18.85
Posts /wp-admin/edit.php3.39 ▲0.0345.17 ▲0.33
Add New Post /wp-admin/post-new.php5.92 ▲0.0380.25 ▼9.87
Media Library /wp-admin/upload.php3.26 ▲0.0333.32 ▼0.28
CampusNet Authentication /wp-admin/options-general.php?page=campusnet_authentication3.2331.76

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for CampusNet Authentication
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲7413.32 ▼1.051.84 ▼0.1537.41 ▼6.06
Dashboard /wp-admin2,210 ▲225.90 ▲1.00104.68 ▼14.6239.55 ▼8.09
Posts /wp-admin/edit.php2,093 ▲42.02 ▲0.0039.75 ▲2.0134.28 ▲0.08
Add New Post /wp-admin/post-new.php1,536 ▼323.28 ▲4.95659.55 ▲40.7051.86 ▼9.06
Media Library /wp-admin/upload.php1,392 ▲44.18 ▼0.01100.50 ▼0.2745.71 ▼0.05
CampusNet Authentication /wp-admin/options-general.php?page=campusnet_authentication8342.0324.8926.31

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/campusnet-authentication/cn_admin.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/campusnet-authentication/cn_authentication.php:39

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
3 plugin tags: university, authentication, campusnet

campusnet-authentication/cn_authentication.php 85% from 13 tests

The main PHP file in "CampusNet Authentication" ver. 0.2.6 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 550 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("campusnet-authentication.php" instead of "cn_authentication.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin254 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22796254

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin