89% show-git-branch

Code Review | Show Git Branch

WordPress plugin Show Git Branch scored89%from 54 tests.

About plugin

  • Plugin page: show-git-branch
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.3
  • WordPress version: 6.3.1
  • First release: Aug 21, 2015
  • Latest release: Aug 21, 2015
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: swaincreates (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /824 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

This is a short check of server-side resources used by Show Git Branch
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.68 ▼2.52
Dashboard /wp-admin3.31 ▼0.0442.86 ▼16.33
Posts /wp-admin/edit.php3.36 ▲0.0043.79 ▼4.43
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.81 ▼15.25
Media Library /wp-admin/upload.php3.23 ▲0.0034.17 ▼0.34

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Show Git Branch
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,849 ▲10314.47 ▼0.291.88 ▲0.1640.25 ▼3.44
Dashboard /wp-admin2,215 ▲295.83 ▼0.1096.23 ▼8.6738.48 ▼5.94
Posts /wp-admin/edit.php2,101 ▲91.99 ▼0.0140.89 ▲0.8234.85 ▼0.34
Add New Post /wp-admin/post-new.php1,549 ▲2118.58 ▲0.28601.12 ▼41.7761.13 ▼2.38
Media Library /wp-admin/upload.php1,397 ▲94.21 ▼0.0398.47 ▼2.7139.81 ▼5.70

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 detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 (A screenshot of the Toolbar.) image missing
Please take inspiration from this readme.txt

show-git-branch/show-git-branch.php 77% from 13 tests

The entry point to "Show Git Branch" version 1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Domain Path: The domain path should use only dashes and lowercase characters ("")
  • Domain Path: The domain path must begin with a forward slash character ("/")

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
There were no executable files found in this plugin40 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2111928
Markdown18012

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png49.10KB14.62KB▼ 70.21%