84% wp-showcase-for-github

Code Review | WP Showcase for GitHub

WordPress plugin WP Showcase for GitHub scored 84% from 54 tests.

About plugin

  • Plugin page: wp-showcase-for-g...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.2
  • WordPress version: 6.3.1
  • First release: Sep 19, 2019
  • Latest release: Sep 19, 2019
  • Number of updates: 7
  • Update frequency: N/A
  • Top authors: galibri (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 500 total downloads

Benchmarks

Plugin footprint 82% 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.04MB] [CPU: ▼7.57ms] 75% from 4 tests

An overview of server-side resources used by WP Showcase for GitHub
Please take the time to fix the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 1,710.73ms on /wp-admin/admin.php?page=ghp-update-repos)
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0545.19 ▲1.14
Dashboard /wp-admin3.34 ▲0.0452.58 ▲5.12
Posts /wp-admin/edit.php3.40 ▲0.0443.82 ▼3.39
Add New Post /wp-admin/post-new.php5.92 ▲0.0481.98 ▼25.08
Media Library /wp-admin/upload.php3.27 ▲0.0436.24 ▼2.94
Projects Settings /wp-admin/admin.php?page=ghp-options3.2329.48
All Repos /wp-admin/edit.php?post_type=repo3.3133.63
Update Repositories /wp-admin/admin.php?page=ghp-update-repos3.911,710.73
Add New /wp-admin/post-new.php?post_type=repo3.3846.38

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP Showcase for GitHub
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,857 ▲11113.26 ▼1.133.77 ▲1.8737.44 ▼4.86
Dashboard /wp-admin2,243 ▲584.98 ▲0.07111.51 ▼16.0573.48 ▲15.46
Posts /wp-admin/edit.php2,135 ▲462.01 ▼0.0441.18 ▲0.8135.73 ▼4.05
Add New Post /wp-admin/post-new.php1,577 ▲6323.44 ▲5.82722.38 ▲79.0869.37 ▲24.19
Media Library /wp-admin/upload.php1,437 ▲494.13 ▼0.04108.76 ▼14.6784.06 ▲31.75
Projects Settings /wp-admin/admin.php?page=ghp-options1,1982.2371.6324.32
All Repos /wp-admin/edit.php?post_type=repo1,1081.9830.5228.95
Update Repositories /wp-admin/admin.php?page=ghp-update-repos8012.0525.9825.47
Add New /wp-admin/post-new.php?post_type=repo2,1777.51167.42113.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

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
Please take a closer look at the following
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-showcase-for-github/template/shortcode-github-projects.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-showcase-for-github/inc/save-options.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-showcase-for-github/inc/dynamic-style.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-showcase-for-github/inc/textdomain.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-showcase-for-github/posts/register-github-posts.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-showcase-for-github/inc/add-options-page.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-showcase-for-github/posts/insert-post.php:40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-showcase-for-github/inc/enqueue-scripts.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: show github, github, github projects, display github

wp-showcase-for-github/github-projects-wp.php 92% from 13 tests

This is the main PHP file of "WP Showcase for GitHub" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-showcase-for-github.php" instead of "github-projects-wp.php")

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
Everything looks great! No dangerous files found in this plugin352 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP113567277
CSS17168
JavaScript2077

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/public/img/github-logo.png2.29KB1.90KB▼ 17.04%
assets/admin/img/github.png0.91KB0.57KB▼ 37.74%