83% documents-from-git

Code Review | Documents from Git

WordPress plugin Documents from Git scored 83% from 54 tests.

About plugin

  • Plugin page: documents-from-git
  • Plugin version: 2.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.8.1
  • WordPress version: 6.3.1
  • First release: Apr 3, 2020
  • Latest release: Oct 9, 2021
  • Number of updates: 17
  • Update frequency: every 32.6 days
  • Top authors: nilsnolde (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

400+ active / 5,390 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
Installer ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▼0.96ms] Passed 4 tests

This is a short check of server-side resources used by Documents from Git
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2343.97 ▼1.24
Dashboard /wp-admin3.54 ▲0.2448.37 ▼1.40
Posts /wp-admin/edit.php3.66 ▲0.3051.07 ▲5.88
Add New Post /wp-admin/post-new.php6.12 ▲0.2489.87 ▼2.67
Media Library /wp-admin/upload.php3.47 ▲0.2538.12 ▲1.46
Documents from Git /wp-admin/options-general.php?page=settings_documents_from_git3.4432.38

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Documents from Git
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲10013.47 ▼0.934.47 ▲2.4340.12 ▼13.33
Dashboard /wp-admin2,210 ▲224.82 ▼0.10102.96 ▼11.1338.74 ▼9.19
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0539.65 ▲3.6534.65 ▼4.00
Add New Post /wp-admin/post-new.php1,540 ▲2123.40 ▲0.20665.24 ▼26.4860.85 ▲3.94
Media Library /wp-admin/upload.php1,392 ▲44.18 ▼0.0198.37 ▼18.1842.42 ▼9.21
Documents from Git /wp-admin/options-general.php?page=settings_documents_from_git9462.0622.9530.54

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
Please fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'BaseLoader' not found in wp-content/plugins/documents-from-git/includes/providers/class-gitlab-loader.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'BaseLoader' not found in wp-content/plugins/documents-from-git/includes/providers/class-bitbucket-loader.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'BaseLoader' not found in wp-content/plugins/documents-from-git/includes/providers/class-github-loader.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: notebook, markdown, jupyter, bitbucket, gitlab...

documents-from-git/documents-git.php 77% from 13 tests

The entry point to "Documents from Git" version 2.2.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("documents-from-git.php" instead of "documents-git.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 191 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected2,213 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP61933201,192
CSS321231,021

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity40.80
▷ Minimum class complexity4.00
▷ Maximum class complexity155.00
Average method complexity4.83
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes120.00%
▷ Concrete classes480.00%
▷ Final classes00.00%
Methods57
▷ Static methods00.00%
▷ Public methods1526.32%
▷ Protected methods3459.65%
▷ Private methods814.04%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected