10% github-user-repo-widget

Code Review | GitHub User Repo Widget

WordPress plugin GitHub User Repo Widget scored10%from 54 tests.

About plugin

  • Plugin page: github-user-repo-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.5
  • WordPress version: 6.3.1
  • First release: Sep 24, 2012
  • Latest release: Sep 25, 2012
  • Number of updates: 6
  • Update frequency: every 0.5 days
  • Top authors: jaredatch (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,826 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/github-user-repo-widget/github-repos-widget.php+191
    Function create_function() is deprecated

Server metrics [RAM: ▼1.91MB] [CPU: ▼52.99ms] Passed 4 tests

Analyzing server-side resources used by GitHub User Repo Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.394.96 ▼42.27
Dashboard /wp-admin2.10 ▼1.215.88 ▼43.71
Posts /wp-admin/edit.php2.10 ▼1.266.14 ▼37.58
Add New Post /wp-admin/post-new.php2.10 ▼3.795.37 ▼88.38
Media Library /wp-admin/upload.php2.10 ▼1.136.46 ▼27.05

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_ja-github
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

GitHub User Repo Widget: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.041.70 ▼0.2543.66 ▲0.88
Dashboard /wp-admin2,206 ▲184.87 ▼0.17105.84 ▼13.9340.98 ▼10.52
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0439.39 ▲4.6134.59 ▼0.77
Add New Post /wp-admin/post-new.php1,533 ▲1923.01 ▲5.50672.56 ▼19.5861.71 ▲7.77
Media Library /wp-admin/upload.php1,382 ▼04.22 ▲0.0692.83 ▼38.8940.68 ▼20.41

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/github-user-repo-widget/github-repos-widget.php+191
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_ja-github
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/github-user-repo-widget/github-repos-widget.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Widget in the admin), #2 (Widget in place on the frontend)
You can take inspiration from this readme.txt

github-user-repo-widget/github-repos-widget.php 92% from 13 tests

The entry point to "GitHub User Repo Widget" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("github-user-repo-widget.php" instead of "github-repos-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin73 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1378173

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.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%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.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
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png17.81KB6.57KB▼ 63.10%
screenshot-2.png14.83KB5.33KB▼ 64.02%