83% gh-profile-widget

Code Review | GitHub Profile Widget

WordPress plugin GitHub Profile Widget scored83%from 54 tests.

About plugin

  • Plugin page: gh-profile-widget
  • Plugin version: 0.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.9
  • WordPress version: 6.3.1
  • First release: Apr 25, 2014
  • Latest release: Apr 25, 2014
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: akeda (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,065 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.30ms] Passed 4 tests

Server-side resources used by GitHub Profile Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.39 ▲0.04
Dashboard /wp-admin3.31 ▲0.0149.34 ▼0.96
Posts /wp-admin/edit.php3.36 ▲0.0150.04 ▲1.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.02 ▼16.11
Media Library /wp-admin/upload.php3.23 ▲0.0135.39 ▼4.17

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by GitHub Profile Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.20 ▼0.191.71 ▼0.2540.01 ▼6.94
Dashboard /wp-admin2,198 ▲215.60 ▲0.0085.50 ▼15.7940.91 ▼2.91
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0737.24 ▼0.6332.49 ▼8.94
Add New Post /wp-admin/post-new.php1,545 ▼022.94 ▼0.37652.33 ▼19.0051.20 ▼4.25
Media Library /wp-admin/upload.php1,400 ▼04.19 ▼0.0798.73 ▼10.4747.55 ▲1.78

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 2× 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/gh-profile-widget/includes/widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gh-profile-widget/gh-profile-widget.php:26

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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 an image for screenshot #1 (Widget instance)
  • Screenshots: These screenshots lack descriptions #2, #3 in gh-profile-widget/assets to your readme.txt
The official readme.txt might help

gh-profile-widget/gh-profile-widget.php 85% from 13 tests

The primary PHP file in "GitHub Profile Widget" version 0.2.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")
  • 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 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected791 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP790122467
Bourne Again Shell24138152
Markdown335073
Bourne Shell112647
YAML15028
XML13024

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity10.25
▷ Minimum class complexity3.00
▷ Maximum class complexity23.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1593.75%
▷ Protected methods00.00%
▷ Private methods16.25%
Functions6
▷ Named functions00.00%
▷ Anonymous functions6100.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 files were detected