10% wp-gitlab

Code Review | WP Gitlab

WordPress plugin WP Gitlab scored 10% from 54 tests.

About plugin

  • Plugin page: wp-gitlab
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1.1
  • WordPress version: 5.8.1
  • First release: Apr 7, 2015
  • Latest release: Apr 8, 2015
  • Number of updates: 5
  • Update frequency: every 2.4 days
  • Top authors: CFarence (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 1,116 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wp-gitlab/wp-gitlab.php+80
    Methods with the same name as their class will not be constructors in a future version of PHP; Gitlab_Widget_Profile has a deprecated constructor

Server metrics [RAM: ▼1.73MB] [CPU: ▼191.70ms] Passed 4 tests

This is a short check of server-side resources used by WP Gitlab
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.90 ▼0.938.70 ▼26.56
Dashboard /wp-admin1.92 ▼1.135.44 ▼42.60
Posts /wp-admin/edit.php1.92 ▼1.205.62 ▼49.74
Add New Post /wp-admin/post-new.php1.92 ▼3.516.04 ▼647.91
Media Library /wp-admin/upload.php1.92 ▼1.0810.51 ▼25.92
WP Gitlab /wp-admin/options-general.php?page=wp-gitlab1.928.15

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 4 new options
New WordPress options
widget_gitlab_repos
widget_gitlab_issues
widget_gitlab_profile
widget_gitlab_commits

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Gitlab
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,686 ▲4915.80 ▼0.209.60 ▼0.1152.99 ▲0.39
Dashboard /wp-admin2,972 ▲385.89 ▼0.19148.94 ▼1.17107.72 ▼13.04
Posts /wp-admin/edit.php2,744 ▲52.69 ▲0.0172.65 ▲0.7982.13 ▼6.59
Add New Post /wp-admin/post-new.php1,584 ▼9916.44 ▼2.39446.95 ▲77.21141.57 ▲22.66
Media Library /wp-admin/upload.php1,815 ▲85.01 ▲0.05159.10 ▼11.78124.67 ▲1.99
WP Gitlab /wp-admin/options-general.php?page=wp-gitlab1,1502.2167.5578.77

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/wp-gitlab/wp-gitlab.php+80
    Methods with the same name as their class will not be constructors in a future version of PHP; Gitlab_Widget_Profile has a deprecated constructor
  • The uninstall procedure has failed, leaving 4 options in the database
    • widget_gitlab_profile
    • widget_gitlab_repos
    • widget_gitlab_issues
    • widget_gitlab_commits

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=wp-gitlab
    • > Deprecated in wp-content/plugins/wp-gitlab/wp-gitlab.php+80
    Methods with the same name as their class will not be constructors in a future version of PHP; Gitlab_Widget_Profile has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=wp-gitlab
    • > Deprecated in wp-content/plugins/wp-gitlab/wp-gitlab.php+159
    Methods with the same name as their class will not be constructors in a future version of PHP; Gitlab_Widget_Repos has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=wp-gitlab
    • > Deprecated in wp-content/plugins/wp-gitlab/wp-gitlab.php+244
    Methods with the same name as their class will not be constructors in a future version of PHP; Gitlab_Widget_Commits has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=wp-gitlab
    • > Deprecated in wp-content/plugins/wp-gitlab/wp-gitlab.php+341
    Methods with the same name as their class will not be constructors in a future version of PHP; Gitlab_Widget_Issues has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=wp-gitlab
    • > Deprecated in wp-content/plugins/wp-gitlab/lib/gitlab.php+8
    Methods with the same name as their class will not be constructors in a future version of PHP; Gitlab has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=wp-gitlab
    • > User deprecated in wp-includes/functions.php+5304
    The called constructor method for WP_Widget in Gitlab_Widget_Profile is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=wp-gitlab
    • > User deprecated in wp-includes/functions.php+5304
    The called constructor method for WP_Widget in Gitlab_Widget_Repos is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=wp-gitlab
    • > User deprecated in wp-includes/functions.php+5304
    The called constructor method for WP_Widget in Gitlab_Widget_Commits is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=wp-gitlab
    • > User deprecated in wp-includes/functions.php+5304
    The called constructor method for WP_Widget in Gitlab_Widget_Issues is deprecated since version 4.3.0! Use __construct() instead.

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
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-gitlab/wp-gitlab.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/wp-gitlab/admin/options.php:5

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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Setting up the widget.), #2 (Repositories widget in action!), #3 (Repositories embedded in a page.), #4 (Profile shortcode.), #5 (Profile widget.)
You can take inspiration from this readme.txt

wp-gitlab/wp-gitlab.php Passed 13 tests

"WP Gitlab" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
68 characters long description:
Display users Gitlab public repositories, commits, issues and gists.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin766 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4111142684
CSS111082

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity10.17
▷ Minimum class complexity5.00
▷ Maximum class complexity26.00
Average method complexity2.28
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods43
▷ Static methods00.00%
▷ Public methods3069.77%
▷ Protected methods00.00%
▷ Private methods1330.23%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.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