84% gist-sidebar-widget

Code Review | GitHub Gists Sidebar Widget

WordPress plugin GitHub Gists Sidebar Widget scored84%from 54 tests.

About plugin

  • Plugin page: gist-sidebar-widget
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.2
  • WordPress version: 6.3.1
  • First release: Dec 24, 2011
  • Latest release: Jul 8, 2015
  • Number of updates: 9
  • Update frequency: every 143.6 days
  • Top authors: norcross (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,816 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by GitHub Gists Sidebar Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0147.44 ▲10.95
Dashboard /wp-admin3.32 ▲0.0150.75 ▼2.69
Posts /wp-admin/edit.php3.37 ▲0.0145.72 ▼3.51
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.81 ▼14.42
Media Library /wp-admin/upload.php3.24 ▲0.0139.55 ▲1.94

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

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

Browser metrics Passed 4 tests

A check of browser resources used by GitHub Gists Sidebar Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.35 ▼0.001.74 ▲0.0944.17 ▼1.99
Dashboard /wp-admin2,200 ▲295.62 ▲0.0388.73 ▼3.2936.32 ▼7.80
Posts /wp-admin/edit.php2,099 ▼12.01 ▲0.0237.19 ▲1.6032.95 ▼4.55
Add New Post /wp-admin/post-new.php1,530 ▲223.19 ▲0.23643.55 ▼2.7960.96 ▲9.23
Media Library /wp-admin/upload.php1,399 ▲54.23 ▲0.01100.01 ▲0.3145.59 ▲1.93

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_list_gists
    • can_compress_scripts

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)
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× 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/gist-sidebar-widget/gist-sidebar-widget.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: widget, gist, github

gist-sidebar-widget/gist-sidebar-widget.php Passed 13 tests

Analyzing the main PHP file in "GitHub Gists Sidebar Widget" version 1.2
58 characters long description:
A sidebar widget to display your public gists from GitHub.

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
Success! There were no dangerous files found in this plugin129 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP16291129

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity17.50
▷ Minimum class complexity5.00
▷ Maximum class complexity30.00
Average method complexity5.12
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods112.50%
▷ Public methods8100.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

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin