78% ispring-learn-jwt

Code Review | iSpring Learn JWT

WordPress plugin iSpring Learn JWT scored 78% from 54 tests.

About plugin

  • Plugin page: ispring-learn-jwt
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: Aug 8, 2017
  • Latest release: Aug 8, 2017
  • Number of updates: 8
  • Update frequency: every 185.0 days
  • Top authors: ispringsolutions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,007 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.59ms] Passed 4 tests

Analyzing server-side resources used by iSpring Learn JWT
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.66 ▼0.58
Dashboard /wp-admin3.37 ▲0.0747.36 ▼3.10
Posts /wp-admin/edit.php3.49 ▲0.1347.47 ▼7.38
Add New Post /wp-admin/post-new.php5.95 ▲0.0790.25 ▼12.73
Media Library /wp-admin/upload.php3.30 ▲0.0735.91 ▼3.13
iSpring Learn JWT /wp-admin/options-general.php?page=ispringlearnjwt3.2632.51

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by iSpring Learn JWT
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.25 ▼1.311.76 ▲0.1240.09 ▼2.93
Dashboard /wp-admin2,210 ▲224.85 ▼1.06107.51 ▲0.3839.42 ▲1.41
Posts /wp-admin/edit.php2,093 ▲42.17 ▲0.1837.93 ▲0.1429.72 ▼2.17
Add New Post /wp-admin/post-new.php1,546 ▲218.36 ▼4.81598.41 ▼26.3349.18 ▼9.88
Media Library /wp-admin/upload.php1,392 ▲104.20 ▼0.01102.42 ▲0.3140.60 ▼8.96
iSpring Learn JWT /wp-admin/options-general.php?page=ispringlearnjwt7932.0325.2327.52

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% 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 no errors were found, this is by no means an exhaustive test

SRP 0% 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 fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ispring-learn-jwt/vendor/firebase/php-jwt/tests/bootstrap.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/ispring-learn-jwt/ispring-learn-jwt.php:43
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/ispring-learn-jwt/vendor/firebase/php-jwt/tests/JWTTest.php:4

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 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Contributors: The plugin contributors field is not present
  • Screenshots: These screenshots need descriptions #1, #2 in ispring-learn-jwt/assets to your readme.txt
You can take inspiration from this readme.txt

ispring-learn-jwt/ispring-learn-jwt.php Passed 13 tests

The principal PHP file in "iSpring Learn JWT" v. 1.0 is loaded by WordPress automatically on each request
61 characters long description:
Enable the Single Sign On between WordPress and iSpring Learn

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin1,187 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP15159308859
XML21095
Markdown121093
JSON20074
Bourne Shell13431
PO File15725
YAML13010

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity13.57
▷ Minimum class complexity1.00
▷ Maximum class complexity46.00
Average method complexity2.49
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods59
▷ Static methods1220.34%
▷ Public methods5593.22%
▷ Protected methods00.00%
▷ Private methods46.78%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin