83% wp-github-card

Code Review | WP GitHub Card

WordPress plugin WP GitHub Card scored83%from 54 tests.

About plugin

  • Plugin page: wp-github-card
  • Plugin version: 2.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.6-6.2
  • WordPress version: 6.3.1
  • First release: Jun 8, 2018
  • Latest release: Apr 5, 2023
  • Number of updates: 45
  • Update frequency: every 39.2 days
  • Top authors: wellflat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /872 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.66MB] [CPU: ▲2.38ms] Passed 4 tests

This is a short check of server-side resources used by WP GitHub Card
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.11 ▲0.6545.49 ▲6.61
Dashboard /wp-admin4.01 ▲0.7048.94 ▼5.28
Posts /wp-admin/edit.php4.06 ▲0.7051.50 ▲3.40
Add New Post /wp-admin/post-new.php6.53 ▲0.6488.56 ▲4.78
Media Library /wp-admin/upload.php3.87 ▲0.6442.82 ▲10.46

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 221 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WP GitHub Card
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5614.45 ▲0.211.56 ▼0.1043.53 ▲5.03
Dashboard /wp-admin2,206 ▲155.88 ▲0.9797.82 ▼24.7837.47 ▼7.08
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0434.48 ▼10.2334.53 ▼1.07
Add New Post /wp-admin/post-new.php1,532 ▲823.37 ▼0.10679.34 ▲4.6364.02 ▲5.30
Media Library /wp-admin/upload.php1,391 ▲94.20 ▲0.0296.91 ▼1.2842.45 ▲0.19

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 143× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Extension\\AbstractExtension' not found in wp-content/plugins/wp-github-card/vendor/twig/twig/src/Extension/CoreExtension.php:75
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig\odeVisitor\odeVisitorInterface' not found in wp-content/plugins/wp-github-card/vendor/twig/twig/src/NodeVisitor/AbstractNodeVisitor.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Extension\\AbstractExtension' not found in wp-content/plugins/wp-github-card/vendor/twig/twig/src/Extension/ProfilerExtension.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\Extension\\AbstractExtension' not found in wp-content/plugins/wp-github-card/vendor/twig/twig/src/Extension/SandboxExtension.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\AbstractExpression' not found in wp-content/plugins/wp-github-card/vendor/twig/twig/src/Node/Expression/Unary/AbstractUnary.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig\odeVisitor\odeVisitorInterface' not found in wp-content/plugins/wp-github-card/vendor/twig/twig/src/NodeVisitor/OptimizerNodeVisitor.php:40
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/wp-github-card/vendor/twig/twig/src/Profiler/Node/EnterProfileNode.php:22
    • > PHP Parse error
      syntax error, unexpected '|', expecting variable (T_VARIABLE) in wp-content/plugins/wp-github-card/vendor/symfony/polyfill-mbstring/bootstrap80.php on line 15
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig\\Extension\\ExtensionInterface' not found in wp-content/plugins/wp-github-card/vendor/twig/twig/src/Extension/AbstractExtension.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/wp-github-card/vendor/twig/twig/src/Node/Expression/Binary/GreaterEqualBinary.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Requires php: Version format is invalid
  • Screenshots: These screenshots do not have images: #1 (GitHub profile card screenshot), #2 (usage)
  • Donate link: Please fix this invalid url: ""
You can look at the official readme.txt

wp-github-card/wp-github-card.php Passed 13 tests

The main PHP file in "WP GitHub Card" ver. 2.3.1 adds more information about the plugin and also serves as the entry point for this plugin
33 characters long description:
GitHub simple profile card plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin15,608 lines of code in 211 files:
LanguageFilesBlank linesComment linesLines of code
PHP2022,8204,57515,080
JSON400388
CSS11091
HTML10022
Markdown28017
reStructuredText18510

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity8.70
▷ Minimum class complexity1.00
▷ Maximum class complexity166.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces27
Interfaces11
Traits0
Classes176
▷ Abstract classes116.25%
▷ Concrete classes16593.75%
▷ Final classes6237.58%
Methods891
▷ Static methods768.53%
▷ Public methods76986.31%
▷ Protected methods485.39%
▷ Private methods748.31%
Functions173
▷ Named functions15489.02%
▷ Anonymous functions1910.98%
Constants59
▷ Global constants610.17%
▷ Class constants5389.83%
▷ Public constants4992.45%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png8.87KB3.46KB▼ 60.98%
screenshot-1.png7.12KB5.12KB▼ 28.15%