84% gist-github-shortcode

Code Review | Gist GitHub Shortcode

WordPress plugin Gist GitHub Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: gist-github-short...
  • Plugin version: 1.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.5
  • WordPress version: 6.3.1
  • First release: Oct 6, 2012
  • Latest release: Aug 11, 2020
  • Number of updates: 16
  • Update frequency: every 179.2 days
  • Top authors: claudiosanches (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

400+ active /7,724 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.50ms] Passed 4 tests

A check of server-side resources used by Gist GitHub Shortcode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.55 ▲2.65
Dashboard /wp-admin3.31 ▲0.0152.16 ▼2.07
Posts /wp-admin/edit.php3.36 ▲0.0146.80 ▼1.47
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.05 ▼14.83
Media Library /wp-admin/upload.php3.24 ▲0.0135.51 ▼7.64

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Gist GitHub Shortcode
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.28 ▼1.111.81 ▲0.1644.65 ▲0.22
Dashboard /wp-admin2,218 ▲155.76 ▲0.7299.70 ▼26.6943.20 ▼3.17
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0635.55 ▼6.6936.61 ▲0.84
Add New Post /wp-admin/post-new.php1,545 ▲1423.48 ▲0.45689.91 ▲37.3359.18 ▲8.82
Media Library /wp-admin/upload.php1,397 ▼34.24 ▲0.10108.61 ▼7.6244.53 ▼4.14

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gist-github-shortcode/gist-github-shortcode.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: syntax, github, code, gist, syntax highlighter

gist-github-shortcode/gist-github-shortcode.php 92% from 13 tests

The main PHP script in "Gist GitHub Shortcode" version 1.3.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin185 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP33048111
PO File1122843
JavaScript11031

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
5 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png6.22KB3.72KB▼ 40.16%
screenshot-3.png13.20KB8.42KB▼ 36.24%
tinymce/github.png0.48KB0.63KB0.00%
screenshot-2.png8.81KB6.07KB▼ 31.06%
screenshot-1.png12.35KB7.93KB▼ 35.77%