10% stronger-github-widget

Code Review | Stronger GitHub Widget

WordPress plugin Stronger GitHub Widget scored10%from 54 tests.

About plugin

  • Plugin page: stronger-github-w...
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.9.2
  • WordPress version: 6.3.1
  • First release: Jan 25, 2013
  • Latest release: Aug 21, 2014
  • Number of updates: 9
  • Update frequency: every 63.8 days
  • Top authors: Potsky (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,879 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
These installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/stronger-github-widget/stronger-github-widget.php+776
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼58.10ms] Passed 4 tests

Analyzing server-side resources used by Stronger GitHub Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.435.04 ▼34.96
Dashboard /wp-admin2.05 ▼1.266.92 ▼43.55
Posts /wp-admin/edit.php2.05 ▼1.315.81 ▼46.68
Add New Post /wp-admin/post-new.php2.05 ▼3.846.69 ▼107.22
Media Library /wp-admin/upload.php2.05 ▼1.185.30 ▼27.77

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_psk_sgw
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Stronger GitHub Widget: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.78 ▲0.461.87 ▼0.3545.04 ▲0.01
Dashboard /wp-admin2,203 ▲155.85 ▲0.9697.22 ▼4.4137.87 ▼5.41
Posts /wp-admin/edit.php2,092 ▲32.01 ▲0.0039.33 ▼1.5432.97 ▼3.19
Add New Post /wp-admin/post-new.php1,514 ▼717.64 ▼5.63690.21 ▲12.4151.49 ▼12.36
Media Library /wp-admin/upload.php1,388 ▲94.20 ▼0.02103.16 ▲2.5745.88 ▲0.73

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/stronger-github-widget/stronger-github-widget.php+776
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_psk_sgw

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant PSK_SGW_PLUGIN_FILE - assumed 'PSK_SGW_PLUGIN_FILE' (this will throw an Error in a future version of PHP) in wp-content/plugins/stronger-github-widget/inc/define.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function status_header() in wp-content/plugins/stronger-github-widget/stronger-github-widget.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/stronger-github-widget/inc/define.php:28

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)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention: You can take inspiration from this readme.txt

stronger-github-widget/stronger-github-widget.php Passed 13 tests

"Stronger GitHub Widget" version 0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
77 characters long description:
A plugin to display your latest GitHub events, commits, and more in a widget.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin750 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2115193518
PO File2100100232

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity122.00
▷ Minimum class complexity122.00
▷ Maximum class complexity122.00
Average method complexity10.31
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods323.08%
▷ Public methods430.77%
▷ Protected methods00.00%
▷ Private methods969.23%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants13100.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/octocat_big.png12.58KB4.46KB▼ 64.53%
img/octocat_small.png2.91KB1.57KB▼ 46.12%
img/octocat_normal.png5.78KB2.47KB▼ 57.23%