84% linkedin-oauth

Code Review | Linkedin_Oauth

WordPress plugin Linkedin_Oauth scored84%from 54 tests.

About plugin

  • Plugin page: linkedin-oauth
  • Plugin version: 0.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4
  • WordPress version: 6.3.1
  • First release: May 9, 2015
  • Latest release: Dec 27, 2015
  • Number of updates: 19
  • Update frequency: every 12.3 days
  • Top authors: k2klettern (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /1,867 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
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼19.40ms] Passed 4 tests

This is a short check of server-side resources used by Linkedin_Oauth
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0943.96 ▲6.10
Dashboard /wp-admin3.39 ▲0.0451.33 ▼27.95
Posts /wp-admin/edit.php3.50 ▲0.1459.78 ▲0.39
Add New Post /wp-admin/post-new.php5.97 ▲0.0886.87 ▼42.38
Media Library /wp-admin/upload.php3.31 ▲0.0839.33 ▼7.67
Linkedin Plugin /wp-admin/options-general.php?page=linkedin-plugin3.2838.28

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
widget_linkedinoauth_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Linkedin_Oauth
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲14213.89 ▼0.489.95 ▲8.1442.61 ▲3.58
Dashboard /wp-admin2,213 ▲276.06 ▲1.11113.56 ▼19.2240.76 ▼1.01
Posts /wp-admin/edit.php2,096 ▲42.00 ▼0.0445.75 ▼8.3838.82 ▼5.51
Add New Post /wp-admin/post-new.php1,536 ▲1721.06 ▼2.21703.40 ▲29.8353.89 ▲1.31
Media Library /wp-admin/upload.php1,389 ▲44.26 ▲0.07107.30 ▼22.4844.64 ▼14.68
Linkedin Plugin /wp-admin/options-general.php?page=linkedin-plugin8632.0627.7831.21

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_linkedinoauth_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/linkedin-oauth/lib/widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/linkedin-oauth/lib/functions.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/linkedin-oauth/linkedin_oauth.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Adds a Button to login your wp-admin), #2 (You have to set an id and secret pass on Linkedin developers API), #3 (Provides a back-end to include your id and secret pass also your redirect URL and if user can register with this button), #4 (Provide a Widget to add a Login Button with or without Title and Short Description), #5 (Metabox to add Login URL to the Menu)
The official readme.txt is a good inspiration

linkedin-oauth/linkedin_oauth.php 92% from 13 tests

The entry point to "Linkedin_Oauth" version 0.1.6 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("linkedin-oauth.php" instead of "linkedin_oauth.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
Good job! No executable or dangerous file extensions detected514 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP45834387
PO File13240116
JavaScript10011

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/bck_button_en.png2.98KB0.93KB▼ 68.75%
img/bck_button.png6.14KB1.78KB▼ 70.96%