10% wp-github-recent-commit

Code Review | WP Github Recent commit

WordPress plugin WP Github Recent commit scored10%from 54 tests.

About plugin

  • Plugin page: wp-github-recent-...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.5
  • WordPress version: 6.3.1
  • First release: Mar 19, 2013
  • Latest release: May 11, 2013
  • Number of updates: 34
  • Update frequency: every 1.6 days
  • Top authors: dholloran (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /823 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
  • This plugin did not install gracefully
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WPGRC_Init::on_activate() should not be called statically

Server metrics [RAM: ▼1.63MB] [CPU: ▼53.40ms] Passed 4 tests

Analyzing server-side resources used by WP Github Recent commit
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.38 ▼1.0910.66 ▼31.47
Dashboard /wp-admin2.39 ▼0.9615.18 ▼53.13
Posts /wp-admin/edit.php2.39 ▼0.9713.27 ▼35.39
Add New Post /wp-admin/post-new.php2.39 ▼3.5014.63 ▼93.60
Media Library /wp-admin/upload.php2.39 ▼0.8413.61 ▼20.55

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_widget_dh_github_widget
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WP Github Recent commit
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.13 ▼1.521.80 ▼0.2442.89 ▼2.07
Dashboard /wp-admin2,206 ▲155.91 ▼0.0295.54 ▼18.2638.74 ▼8.62
Posts /wp-admin/edit.php2,089 ▲32.01 ▼0.0239.50 ▲4.3135.32 ▼1.08
Add New Post /wp-admin/post-new.php1,542 ▲1418.61 ▼4.36618.77 ▲29.1654.34 ▲6.93
Media Library /wp-admin/upload.php1,385 ▼34.19 ▼0.0496.64 ▼9.6740.40 ▼2.87

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 did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in WP_Github_Recent_Commit_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • widget_widget_dh_github_widget
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

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)
Good news, no errors were detected

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
The following issues need your attention
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WPGRC_Github_API_v3' not found in wp-content/plugins/wp-github-recent-commit/views/view-github-widget.php:7
    • > PHP Warning
      extract() expects parameter 1 to be array, null given in wp-content/plugins/wp-github-recent-commit/widget/views/view-github-widget.php on line 4
    • > PHP Warning
      extract() expects parameter 1 to be array, null given in wp-content/plugins/wp-github-recent-commit/widget/views/view-github-widget.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'WPGRC_Github_API_v3' not found in wp-content/plugins/wp-github-recent-commit/widget/views/view-github-widget.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-github-recent-commit/wp-github-recent-commit.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-github-recent-commit/widget/widgets.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'Cache_Github_Api_V3' not found in wp-content/plugins/wp-github-recent-commit/classes/class.github-api-v3.php:6
    • > PHP Warning
      extract() expects parameter 1 to be array, null given in wp-content/plugins/wp-github-recent-commit/views/view-github-widget.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-github-recent-commit/widget/github-widget.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wp-github-recent-commit === )
The official readme.txt might help

wp-github-recent-commit/wp-github-recent-commit.php Passed 13 tests

The main PHP file in "WP Github Recent commit" ver. 1.1.1 adds more information about the plugin and also serves as the entry point for this plugin
116 characters long description:
Wordpress widget that grabs a random Octocat from the Octodex and the latest commit from a public GitHub repository.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected807 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP8170178728
Markdown114039
Sass11128
CSS11312

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity21.80
▷ Minimum class complexity10.00
▷ Maximum class complexity46.00
Average method complexity3.89
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods36
▷ Static methods00.00%
▷ Public methods2466.67%
▷ Protected methods1233.33%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.15MB with 0.11MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png49.63KB13.85KB▼ 72.09%
screenshot-1.png31.64KB9.19KB▼ 70.95%
screenshot1.png31.64KB9.19KB▼ 70.95%
screenshot2.png38.63KB10.54KB▼ 72.71%