89% widget-shortcodes-for-github

Code Review | Widget Shortcodes for Github

WordPress plugin Widget Shortcodes for Github scored89%from 54 tests.

About plugin

  • Plugin page: widget-shortcodes...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.2
  • WordPress version: 6.3.1
  • First release: Sep 3, 2019
  • Latest release: Sep 4, 2019
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: jamqes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /455 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
Install script ran successfully

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

Analyzing server-side resources used by Widget Shortcodes for Github
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.03 ▲2.89
Dashboard /wp-admin3.33 ▼0.0148.21 ▼14.57
Posts /wp-admin/edit.php3.38 ▲0.0250.64 ▲4.24
Add New Post /wp-admin/post-new.php5.92 ▲0.0289.65 ▼0.41
Media Library /wp-admin/upload.php3.26 ▲0.0234.50 ▲0.64

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Widget Shortcodes for Github
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.73 ▼0.581.71 ▼0.2842.62 ▼9.61
Dashboard /wp-admin2,203 ▲185.80 ▲0.96100.95 ▼13.9537.28 ▼5.53
Posts /wp-admin/edit.php2,089 ▼02.05 ▼0.0140.11 ▲5.1136.46 ▲0.24
Add New Post /wp-admin/post-new.php1,542 ▲2818.06 ▲0.58598.19 ▼95.5552.01 ▼0.52
Media Library /wp-admin/upload.php1,391 ▲94.19 ▲0.0198.33 ▼0.8143.59 ▲2.30

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

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 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: buttons, shortcodes, gist, github

widget-shortcodes-for-github/widget-shortcodes-gh.php 77% from 13 tests

The main PHP script in "Widget Shortcodes for Github" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 184 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("widget-shortcodes-for-github.php" instead of "widget-shortcodes-gh.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
No dangerous file extensions were detected174 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP431105174

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods5
▷ Static methods120.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin