84% my-github

Code Review | My Github

WordPress plugin My Github scored84%from 54 tests.

About plugin

  • Plugin page: my-github
  • Plugin version: 1.2.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.2
  • WordPress version: 6.3.1
  • First release: Apr 20, 2021
  • Latest release: May 5, 2023
  • Number of updates: 49
  • Update frequency: every 15.2 days
  • Top authors: ratulhasan (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /719 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼0.18ms] Passed 4 tests

A check of server-side resources used by My Github
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0643.04 ▲2.48
Dashboard /wp-admin3.38 ▲0.0754.92 ▲6.74
Posts /wp-admin/edit.php3.48 ▲0.1353.95 ▼2.25
Add New Post /wp-admin/post-new.php5.97 ▲0.0997.02 ▼7.69
Media Library /wp-admin/upload.php3.29 ▲0.0738.54 ▲7.53
My GitHub /wp-admin/options-general.php?page=my-github3.2836.30

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 52 new files
Database: no new tables, 9 new options
New WordPress options
_my_github_installed
_my_github_version
widget_recent-comments
widget_my-github
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for My Github
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲7513.18 ▼1.211.82 ▲0.1042.42 ▼2.34
Dashboard /wp-admin2,210 ▲226.01 ▲0.1197.49 ▼20.9039.38 ▼3.32
Posts /wp-admin/edit.php2,096 ▲72.05 ▲0.0539.00 ▼7.8635.52 ▼2.08
Add New Post /wp-admin/post-new.php1,542 ▲918.45 ▼4.79595.32 ▼9.8356.10 ▲6.76
Media Library /wp-admin/upload.php1,389 ▲44.24 ▲0.0698.06 ▼2.2740.95 ▼4.06
My GitHub /wp-admin/options-general.php?page=my-github8802.0621.6628.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_recent-posts
    • db_upgraded
    • _my_github_version
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • _my_github_installed
    • widget_theysaidso_widget
    • widget_my-github

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/my-github/includes/templates/my_github_settings.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/my-github/includes/Frontend/Widget.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/my-github/includes/templates/my_github_widget.php:6
    • > PHP Notice
      Undefined variable: show_avatar in wp-content/plugins/my-github/includes/templates/my_github_widget.php on line 2
    • > PHP Warning
      require_once(wp-content/plugins/my-github/vendor/appsero/client/vendor/tareq1988/wp-php-cs-fixer/loader.php): failed to open stream: No such file or directory in wp-content/plugins/my-github/vendor/appsero/client/.php-cs-fixer.dist.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/my-github/includes/templates/my_github_profile.php:18
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/my-github/vendor/appsero/client/vendor/tareq1988/wp-php-cs-fixer/loader.php' (include_path='.:/usr/share/php') in wp-content/plugins/my-github/vendor/appsero/client/.php-cs-fixer.dist.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (GitHub Profile), #2 (GitHub Widget Setup), #3 (GitHub Widget Profile View)
The official readme.txt might help

my-github/my-github.php Passed 13 tests

The main file in "My Github" v. 1.2.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
72 characters long description:
A simple and nice WordPress plugin that can track your github's profile.

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
There were no executable files found in this plugin16,795 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
SVG4009,555
CSS51,509163,251
PHP286551,4073,210
Markdown61240383
JSON300135
XML2721113
PO File1283266
YAML212064
JavaScript21518

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity23.12
▷ Minimum class complexity1.00
▷ Maximum class complexity86.00
Average method complexity3.16
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes16.25%
Methods165
▷ Static methods2414.55%
▷ Public methods12978.18%
▷ Protected methods63.64%
▷ Private methods3018.18%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants7
▷ Global constants685.71%
▷ Class constants114.29%
▷ 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
No PNG files were detected