83% f13-github-repo-shortcode

Code Review | GitHub Repository Shortcode

WordPress plugin GitHub Repository Shortcode scored83%from 54 tests.

About plugin

  • Plugin page: f13-github-repo-s...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.8
  • WordPress version: 6.3.1
  • First release: Jul 14, 2016
  • Latest release: Sep 15, 2018
  • Number of updates: 4
  • Update frequency: every 198.3 days
  • Top authors: f13dev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,138 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.20ms] Passed 4 tests

A check of server-side resources used by GitHub Repository Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.94 ▲3.46
Dashboard /wp-admin3.33 ▼0.0144.17 ▼15.13
Posts /wp-admin/edit.php3.38 ▲0.0345.20 ▲0.09
Add New Post /wp-admin/post-new.php5.91 ▲0.0380.37 ▼17.20
Media Library /wp-admin/upload.php3.26 ▲0.0337.26 ▲3.43
F13 GitHub Repo Shortcode /wp-admin/options-general.php?page=f13-github-repo-shortcode3.2232.16

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

GitHub Repository Shortcode: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6014.78 ▲0.411.74 ▲0.0644.33 ▲4.30
Dashboard /wp-admin2,210 ▲285.75 ▲0.86103.63 ▲1.5938.22 ▼3.67
Posts /wp-admin/edit.php2,093 ▲42.03 ▼0.0139.72 ▲5.8135.20 ▲5.12
Add New Post /wp-admin/post-new.php1,517 ▼2617.52 ▼0.77666.39 ▲19.1663.73 ▲14.15
Media Library /wp-admin/upload.php1,392 ▲44.20 ▼0.0397.21 ▼0.8543.71 ▼8.57
F13 GitHub Repo Shortcode /wp-admin/options-general.php?page=f13-github-repo-shortcode8542.0324.1625.84

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/f13-github-repo-shortcode/wp-github-repo-shortcode.php:29

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 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Screenshot #1 (An example showing the results of the shortcode [gitrepo author="wordpress" repo="wordpress"]) image not found
  • Plugin Name: Please specify the plugin name on the first line ( === f13-github-repo-shortcode === )
The official readme.txt might help

f13-github-repo-shortcode/wp-github-repo-shortcode.php 92% from 13 tests

The principal PHP file in "GitHub Repository Shortcode" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("f13-github-repo-shortcode.php" instead of "wp-github-repo-shortcode.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
There were no executable files found in this plugin330 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP121101204
CSS111285
Markdown118041

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 1.53MB with 1.18MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png286.25KB97.03KB▼ 66.10%
img/git_logo.png2.96KB1.52KB▼ 48.85%
img/banner.png638.00KB21.34KB▼ 96.66%
img/git_banner.png641.13KB29.10KB▼ 95.46%