74% simpleshib

Code Review | SimpleShib

WordPress plugin SimpleShib scored74%from 54 tests.

About plugin

  • Plugin page: simpleshib
  • Plugin version: 1.2.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.4
  • WordPress version: 6.3.1
  • First release: Feb 17, 2017
  • Latest release: Jun 20, 2020
  • Number of updates: 20
  • Update frequency: every 60.9 days
  • Top authors: srg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /762 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼2.00ms] Passed 4 tests

This is a short check of server-side resources used by SimpleShib
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0941.26 ▲3.74
Dashboard /wp-admin3.39 ▲0.0947.82 ▲0.03
Posts /wp-admin/edit.php3.50 ▲0.1548.32 ▲1.41
Add New Post /wp-admin/post-new.php5.97 ▲0.0983.39 ▼8.55
Media Library /wp-admin/upload.php3.31 ▲0.0933.90 ▼0.88
SimpleShib /wp-admin/options-general.php?page=simpleshib_settings3.2833.25

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

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

Browser metrics Passed 4 tests

A check of browser resources used by SimpleShib
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.41 ▲0.031.82 ▲0.0544.00 ▼7.29
Dashboard /wp-admin2,210 ▲254.85 ▼0.05108.39 ▲4.1540.58 ▼0.41
Posts /wp-admin/edit.php2,093 ▲72.02 ▼0.0535.81 ▼1.9133.81 ▼0.51
Add New Post /wp-admin/post-new.php1,545 ▲918.20 ▼5.00630.02 ▼47.9651.16 ▼8.02
Media Library /wp-admin/upload.php1,392 ▲104.21 ▼0.1397.36 ▼2.4843.56 ▼3.44
SimpleShib /wp-admin/options-general.php?page=simpleshib_settings9572.0327.4431.72

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Incomplete uninstall procedure, leaving 5 files (0.03MB) in the plugin directory
    • (new file) uninstall.php
    • (new file) class-simple-shib.php
    • (new file) simpleshib.php
    • (new file) readme.txt
    • (new file) LICENSE
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/simpleshib/simpleshib.php
    • > /wp-content/plugins/simpleshib/uninstall.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: login, authentication, sso, shibboleth

simpleshib/simpleshib.php Passed 13 tests

"SimpleShib" version 1.2.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
50 characters long description:
User authentication via Shibboleth Single Sign-On.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin408 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP387307408

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity63.00
▷ Minimum class complexity63.00
▷ Maximum class complexity63.00
Average method complexity4.65
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods1372.22%
▷ Protected methods00.00%
▷ Private methods527.78%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin