10% wp-github-tools

Code Review | WP GitHub Tools

WordPress plugin WP GitHub Tools scored10%from 54 tests.

About plugin

  • Plugin page: wp-github-tools
  • Plugin version: 1.4.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.5.3
  • WordPress version: 6.3.1
  • First release: Feb 24, 2013
  • Latest release: Aug 11, 2016
  • Number of updates: 38
  • Update frequency: every 33.3 days
  • Top authors: vilmosioo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,804 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/wp-github-tools/includes/WP_Github_Tools_Cache.php+25
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.66MB] [CPU: ▼53.84ms] Passed 4 tests

An overview of server-side resources used by WP GitHub Tools
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.49 ▼0.9711.38 ▼32.04
Dashboard /wp-admin2.29 ▼1.028.09 ▼44.19
Posts /wp-admin/edit.php2.29 ▼1.078.79 ▼41.91
Add New Post /wp-admin/post-new.php2.29 ▼3.606.90 ▼97.20
Media Library /wp-admin/upload.php2.29 ▼0.948.50 ▼25.26
GitHub Tools /wp-admin/tools.php?page=WP_Github_Tools_Settings2.297.31

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 9 new options
New WordPress options
WP_Github_Tools_Settingsgeneral
widget_wp_github_tools_widget
can_compress_scripts
widget_wp_github_tools_releases_widget
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WP GitHub Tools
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,860 ▲7413.83 ▼0.581.75 ▼0.2943.03 ▲4.40
Dashboard /wp-admin2,269 ▲665.13 ▲0.25105.71 ▼0.6040.26 ▼3.20
Posts /wp-admin/edit.php2,145 ▲452.30 ▲0.3047.37 ▲11.4935.64 ▲1.00
Add New Post /wp-admin/post-new.php1,552 ▲2123.23 ▲0.08678.31 ▲7.4751.46 ▼0.83
Media Library /wp-admin/upload.php1,445 ▲454.37 ▲0.21100.94 ▼5.0941.26 ▼4.97
GitHub Tools /wp-admin/tools.php?page=WP_Github_Tools_Settings9351.8829.7126.68

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
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the WP_Github_Tools_D3 handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_wp_github_tools_releases_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_wp_github_tools_widget
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/tools.php?page=WP_Github_Tools_Settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the WP_Github_Tools_D3 handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/tools.php?page=WP_Github_Tools_Settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the WP_Github_Tools_NVD3 handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/tools.php?page=WP_Github_Tools_Settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the WP_Github_Tools_NVD3_Style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/tools.php?page=WP_Github_Tools_Settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the WP_Github_Tools_Chart handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/tools.php?page=WP_Github_Tools_Settings
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the WP_Github_Tools_Chart_Style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=WP_Github_Tools_Settings
    • > Notice in wp-content/plugins/wp-github-tools/wp_github_tools.php+131
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/tools.php?page=WP_Github_Tools_Settings
    • > Notice in wp-content/plugins/wp-github-tools/includes/WP_Github_Tools_Options.php+131
    Undefined index: repositories

SRP 0% 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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-github-tools/vendor/michelf/php-markdown/Readme.php
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Michelf\\Markdown' not found in wp-content/plugins/wp-github-tools/vendor/michelf/php-markdown/Michelf/MarkdownExtra.php:20
    • > PHP Fatal error
      require_once(): Failed opening required 'VI_GITHUB_COMMITS_DIRincludes/WP_Github_Tools_API.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-github-tools/includes/WP_Github_Tools_Cache.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-github-tools/includes/WP_Github_Tools_Releases_Widget.php:8
    • > PHP Warning
      Use of undefined constant VI_GITHUB_COMMITS_DIR - assumed 'VI_GITHUB_COMMITS_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-github-tools/includes/WP_Github_Tools_Cache.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-github-tools/wp_github_tools.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-github-tools/includes/WP_Github_Tools_Commits_Widget.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Michelf\\MarkdownInterface' not found in wp-content/plugins/wp-github-tools/vendor/michelf/php-markdown/Michelf/Markdown.php:20
    • > PHP Warning
      require_once(VI_GITHUB_COMMITS_DIRincludes/WP_Github_Tools_API.php): failed to open stream: No such file or directory in wp-content/plugins/wp-github-tools/includes/WP_Github_Tools_Cache.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: gist, commit, tool, widget, repository...

wp-github-tools/wp_github_tools.php 92% from 13 tests

This is the main PHP file of "WP GitHub Tools" version 1.4.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-github-tools.php" instead of "wp_github_tools.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
Everything looks great! No dangerous files found in this plugin3,580 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP216551,1803,229
Markdown31540348
CSS2002
JavaScript1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity32.08
▷ Minimum class complexity1.00
▷ Maximum class complexity112.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces2
Interfaces1
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods169
▷ Static methods1710.06%
▷ Public methods7343.20%
▷ Protected methods9355.03%
▷ Private methods31.78%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants10
▷ Global constants330.00%
▷ Class constants770.00%
▷ Public constants7100.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
PNG images were not found in this plugin