10% oauth-for-gap-messenger

Code Review | Oauth for Gap Messenger

WordPress plugin Oauth for Gap Messenger scored 10% from 54 tests.

About plugin

  • Plugin page: oauth-for-gap-mes...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.2
  • WordPress version: 5.8.1
  • First release: Aug 15, 2019
  • Latest release: Aug 15, 2019
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: ehsansabet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 237 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/oauth-for-gap-messenger/oauth-for-gap-messenger.php+54
    Undefined index: client_secret

Server metrics [RAM: ▼1.89MB] [CPU: ▼190.71ms] Passed 4 tests

This is a short check of server-side resources used by Oauth for Gap Messenger
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.74 ▼1.095.96 ▼25.25
Dashboard /wp-admin1.76 ▼1.295.78 ▼36.77
Posts /wp-admin/edit.php1.76 ▼1.356.25 ▼38.36
Add New Post /wp-admin/post-new.php1.76 ▼3.675.82 ▼658.78
Media Library /wp-admin/upload.php1.76 ▼1.245.42 ▼28.93
Gap OAuth Setting /wp-admin/options-general.php?page=settings_api_test1.766.11

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 1 new option
New WordPress options
oauth_gap_configs

Browser metrics Passed 4 tests

This is an overview of browser requirements for Oauth for Gap Messenger
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,930 ▲33417.63 ▲2.087.25 ▼2.9151.81 ▼2.34
Dashboard /wp-admin3,194 ▲2578.18 ▲2.22167.32 ▲4.40123.35 ▲10.14
Posts /wp-admin/edit.php2,992 ▲2534.35 ▲1.6586.25 ▲17.8292.73 ▲6.49
Add New Post /wp-admin/post-new.php1,521 ▲2118.42 ▼0.30347.60 ▼23.76120.38 ▲2.57
Media Library /wp-admin/upload.php1,838 ▲314.99 ▼0.04119.67 ▼34.85126.44 ▲5.88
Gap OAuth Setting /wp-admin/options-general.php?page=settings_api_test1,3724.1089.8882.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/oauth-for-gap-messenger/oauth-for-gap-messenger.php+54
    Undefined index: client_secret
  • The uninstall procedure has failed, leaving 1 option in the database
    • oauth_gap_configs

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=settings_api_test
    • > Notice in wp-content/plugins/oauth-for-gap-messenger/oauth-for-gap-messenger.php+54
    Undefined index: client_secret

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/oauth-for-gap-messenger/inc/oauth-gap-messenger-admin.php:126
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/oauth-for-gap-messenger/oauth-for-gap-messenger.php:16

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

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: messenger, oauth, gap

oauth-for-gap-messenger/oauth-for-gap-messenger.php 92% from 13 tests

"Oauth for Gap Messenger" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
No dangerous file extensions were detected1,062 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP42054141,015
PO File1141747

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity31.80
▷ Minimum class complexity3.00
▷ Maximum class complexity69.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods79
▷ Static methods00.00%
▷ Public methods7291.14%
▷ Protected methods11.27%
▷ Private methods67.59%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.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