84% git-snippets

Code Review | Git Snippets

WordPress plugin Git Snippets scored84%from 54 tests.

About plugin

  • Plugin page: git-snippets
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.8
  • WordPress version: 6.3.1
  • First release: Aug 29, 2019
  • Latest release: Sep 25, 2021
  • Number of updates: 4
  • Update frequency: every 189.5 days
  • Top authors: aochoae (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /648 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼1.06ms] Passed 4 tests

Analyzing server-side resources used by Git Snippets
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0839.87 ▼10.45
Dashboard /wp-admin3.38 ▲0.0753.27 ▲2.95
Posts /wp-admin/edit.php3.49 ▲0.1351.96 ▲2.32
Add New Post /wp-admin/post-new.php5.96 ▲0.0792.66 ▲3.82
Media Library /wp-admin/upload.php3.30 ▲0.0737.36 ▲0.96

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Git Snippets
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.011.84 ▼0.0242.52 ▼3.14
Dashboard /wp-admin2,195 ▲155.61 ▼0.0688.72 ▼14.5840.28 ▼4.05
Posts /wp-admin/edit.php2,103 ▲31.94 ▼0.0741.90 ▲3.0635.05 ▼2.54
Add New Post /wp-admin/post-new.php1,539 ▲1323.27 ▲0.23610.58 ▼97.1147.83 ▼21.50
Media Library /wp-admin/upload.php1,394 ▼94.22 ▼0.1099.98 ▼8.6844.02 ▼2.61

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'GitSnippets\\Admin\\Settings\\AbstractPage' not found in wp-content/plugins/git-snippets/src/Admin/Settings/General.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: git, shortcode, gitlab

git-snippets/git-snippets.php Passed 13 tests

"Git Snippets" version 2.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
79 characters long description:
With Git Snippets you can share code snippets with the world from your website.

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 plugin852 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP19236544847
JSON1005

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity12.20
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes10
▷ Abstract classes110.00%
▷ Concrete classes990.00%
▷ Final classes00.00%
Methods65
▷ Static methods2233.85%
▷ Public methods5686.15%
▷ Protected methods00.00%
▷ Private methods913.85%
Functions6
▷ Named functions116.67%
▷ Anonymous functions583.33%
Constants2
▷ Global constants150.00%
▷ Class constants150.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
PNG images were not found in this plugin