10% better-github-gists-widget

Code Review | Better Github Gists Widget

WordPress plugin Better Github Gists Widget scored 10% from 54 tests.

About plugin

  • Plugin page: better-github-gis...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.2-3.5.2
  • WordPress version: 6.3.1
  • First release: Jul 24, 2013
  • Latest release: Jul 24, 2013
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: arch1t3ct (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 920 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/better-github-gists-widget/plugin.php+329
    Function create_function() is deprecated

Server metrics [RAM: ▼1.85MB] [CPU: ▼52.75ms] Passed 4 tests

Analyzing server-side resources used by Better Github Gists Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.324.65 ▼40.00
Dashboard /wp-admin2.16 ▼1.147.02 ▼38.34
Posts /wp-admin/edit.php2.16 ▼1.206.59 ▼42.77
Add New Post /wp-admin/post-new.php2.16 ▼3.735.79 ▼89.87
Media Library /wp-admin/upload.php2.16 ▼1.075.49 ▼27.97

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_better-github-gists-widget-id
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Better Github Gists Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲13013.59 ▼1.055.84 ▲3.6138.56 ▼12.48
Dashboard /wp-admin2,210 ▲194.88 ▼1.06112.48 ▲2.2443.89 ▼0.59
Posts /wp-admin/edit.php2,093 ▲42.04 ▼0.0135.40 ▼1.2630.77 ▼2.69
Add New Post /wp-admin/post-new.php1,522 ▼323.50 ▲0.38675.40 ▼20.9863.03 ▲6.16
Media Library /wp-admin/upload.php1,392 ▲44.23 ▲0.0597.11 ▼12.8442.42 ▼5.39

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/better-github-gists-widget/plugin.php+329
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_better-github-gists-widget-id
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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 perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/better-github-gists-widget/views/admin.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/better-github-gists-widget/views/widget.php on line 24
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/better-github-gists-widget/plugin.php:31

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

readme.txt 94% 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 images for these screenshots: #1 (Widget options.), #2 (Actual widget content using default Twenty Eleven theme.)
Please take inspiration from this readme.txt

better-github-gists-widget/plugin.php 85% from 13 tests

The primary PHP file in "Better Github Gists Widget" version 1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("better-github-gists-widget.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin225 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP37684194
PO File10017
JavaScript20210
CSS2014

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.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 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
17 PNG files occupy 0.68MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/Java.png0.71KB0.72KB0.00%
images/C++.png0.86KB0.81KB▼ 6.13%
screenshot-2.png670.25KB236.10KB▼ 64.77%
images/PHP.png0.87KB0.81KB▼ 6.09%
images/JavaScript.png0.84KB0.79KB▼ 6.26%