84% scoutdocs

Code Review | ScoutDocs

WordPress plugin ScoutDocs scored 84% from 54 tests.

About plugin

  • Plugin page: scoutdocs
  • Plugin version: 1.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.0
  • WordPress version: 6.3.1
  • First release: May 7, 2018
  • Latest release: Aug 17, 2019
  • Number of updates: 21
  • Update frequency: every 22.5 days
  • Top authors: scoutdocs (95.24%)markjaquith (9.52%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.29MB] [CPU: ▼7.57ms] Passed 4 tests

Server-side resources used by ScoutDocs
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.3140.59 ▼2.05
Dashboard /wp-admin3.63 ▲0.3351.27 ▲0.25
Posts /wp-admin/edit.php3.68 ▲0.3350.57 ▲3.83
Add New Post /wp-admin/post-new.php6.16 ▲0.2791.94 ▼30.92
Media Library /wp-admin/upload.php3.49 ▲0.2638.90 ▲2.45
ScoutDocs /wp-admin/options-general.php?page=scoutdocs3.9237.44

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

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

Browser metrics Passed 4 tests

ScoutDocs: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲16114.79 ▲0.491.88 ▼0.1042.52 ▼10.57
Dashboard /wp-admin2,321 ▲1365.82 ▼0.2399.37 ▼15.7938.47 ▼8.29
Posts /wp-admin/edit.php2,211 ▲1252.06 ▲0.0236.75 ▼1.7734.40 ▼2.06
Add New Post /wp-admin/post-new.php1,557 ▲2923.31 ▼0.33630.15 ▼43.8448.67 ▼4.14
Media Library /wp-admin/upload.php1,509 ▲1184.39 ▲0.1898.76 ▼4.2541.74 ▼2.02
ScoutDocs /wp-admin/options-general.php?page=scoutdocs1,2433.3743.0525.28

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

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=scoutdocs
    • > Deprecated in wp-content/plugins/scoutdocs/lib/browser.php+152
    Methods with the same name as their class will not be constructors in a future version of PHP; Browser has a deprecated constructor

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Congratulations! This plugin passed the SRP test

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: sharing, document sharing, repository, documents

scoutdocs/scoutdocs.php Passed 13 tests

The main PHP file in "ScoutDocs" ver. 1.5.0 adds more information about the plugin and also serves as the entry point for this plugin
38 characters long description:
Secure file sharing, on your own site.

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 detected82,910 lines of code in 217 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript111,0022,15968,997
Sass861,1411,0205,254
JSX846141594,112
PHP214191,1762,228
CSS3261401,873
HTML14317293
SVG1000151
Markdown1102

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity42.71
▷ Minimum class complexity8.00
▷ Maximum class complexity118.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods168
▷ Static methods95.36%
▷ Public methods15491.67%
▷ Protected methods84.76%
▷ Private methods63.57%
Functions10
▷ Named functions00.00%
▷ Anonymous functions10100.00%
Constants11
▷ Global constants19.09%
▷ Class constants1090.91%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
72 compressed PNG files occupy 0.05MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/vendor/pdfjs/web/images/findbarButton-previous@2x.png0.30KB0.48KB0.00%
js/vendor/pdfjs/web/images/secondaryToolbarButton-lastPage@2x.png0.27KB0.39KB0.00%
js/vendor/pdfjs/web/images/secondaryToolbarButton-firstPage@2x.png0.26KB0.40KB0.00%
js/vendor/pdfjs/web/images/findbarButton-next.png0.19KB0.31KB0.00%
js/vendor/pdfjs/web/images/toolbarButton-presentationMode.png0.31KB0.53KB0.00%