57% easydocs

Code Review | wpEasyDocs

WordPress plugin wpEasyDocs scored57%from 54 tests.

About plugin

  • Plugin page: easydocs
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.4
  • WordPress version: 6.3.1
  • First release: May 5, 2020
  • Latest release: May 6, 2020
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: diffhu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /833 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲3.21MB] [CPU: ▲20.59ms] Passed 4 tests

Server-side resources used by wpEasyDocs
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /6.69 ▲3.2262.03 ▲22.44
Dashboard /wp-admin6.54 ▲3.2485.28 ▲33.28
Posts /wp-admin/edit.php6.60 ▲3.2477.80 ▲23.09
Add New Post /wp-admin/post-new.php9.08 ▲3.20118.32 ▲12.93
Media Library /wp-admin/upload.php6.41 ▲3.1862.73 ▲23.91

Server storage [IO: ▲5.94MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 1,171 new files
Database: 6 new tables, 6 new options
New tables
ed_migrations
ed_folders
ed_files
ed_file_tag
ed_tags
ed_types
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for wpEasyDocs
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,929 ▲16813.83 ▼0.369.82 ▲8.2944.06 ▼1.28
Dashboard /wp-admin2,222 ▲455.67 ▼0.0384.36 ▼2.8138.26 ▼6.93
Posts /wp-admin/edit.php2,127 ▲272.10 ▲0.1239.53 ▲4.7738.56 ▼1.17
Add New Post /wp-admin/post-new.php1,551 ▲2522.99 ▼0.18670.91 ▲4.6655.59 ▼2.44
Media Library /wp-admin/upload.php1,427 ▲304.33 ▲0.1495.07 ▼5.1644.70 ▲1.68

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The plugin did not uninstall successfully, leaving 6 tables in the database
    • ed_types
    • ed_files
    • ed_tags
    • ed_file_tag
    • ed_migrations
    • ed_folders
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% from 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
The following issues need your attention
  • 14× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/easydocs/admin/partials/easy-docs-admin-display.php
    • > /wp-content/plugins/easydocs/resources/views/shortcode/main.blade.php
    • > /wp-content/plugins/easydocs/resources/views/widget/folders.blade.php
    • > /wp-content/plugins/easydocs/resources/views/widget/button.blade.php
    • > /wp-content/plugins/easydocs/resources/views/partials/files.blade.php
    • > /wp-content/plugins/easydocs/vendor/symfony/translation/Resources/bin/translation-status.php
    • > /wp-content/plugins/easydocs/resources/views/layouts/file.blade.php
    • > /wp-content/plugins/easydocs/vendor/duncan3dc/blade/travis/laravel.php
    • > /wp-content/plugins/easydocs/resources/views/widget/file.blade.php
    • > /wp-content/plugins/easydocs/resources/views/shortcode/folders.blade.php
  • 440× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Console\\Command' not found in wp-content/plugins/easydocs/vendor/illuminate/console/Scheduling/ScheduleFinishCommand.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Database\\Grammar' not found in wp-content/plugins/easydocs/vendor/illuminate/database/Schema/Grammars/Grammar.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Database\\Query\\Processors\\Processor' not found in wp-content/plugins/easydocs/vendor/illuminate/database/Query/Processors/SqlServerProcessor.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Console\\Tests\\Descriptor\\AbstractDescriptorTest' not found in wp-content/plugins/easydocs/vendor/symfony/console/Tests/Descriptor/XmlDescriptorTest.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\Catalogue\\OperationInterface' not found in wp-content/plugins/easydocs/vendor/symfony/translation/Catalogue/AbstractOperation.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Database\\Console\\Migrations\\BaseCommand' not found in wp-content/plugins/easydocs/vendor/illuminate/database/Console/Migrations/ResetCommand.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Illuminate\\Support\\ServiceProvider' not found in wp-content/plugins/easydocs/vendor/illuminate/database/DatabaseServiceProvider.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Finder\\Iterator\\FilterIterator' not found in wp-content/plugins/easydocs/vendor/symfony/finder/Iterator/DateRangeFilterIterator.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Illuminate\\Contracts\\Bus\\Dispatcher' not found in wp-content/plugins/easydocs/vendor/illuminate/support/Testing/Fakes/BusFake.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Console\\Helper\\Helper' not found in wp-content/plugins/easydocs/vendor/symfony/console/Helper/FormatterHelper.php:21

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add a description for screenshot #3 in easydocs/assets to your readme.txt
The official readme.txt might help

easydocs/easy-docs.php 85% from 13 tests

The principal PHP file in "wpEasyDocs" v. 1.1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("easydocs.php" instead of "easy-docs.php")

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Please fix the following items
  • Do not distribute dangerous files with your plugin
    • .exe - Executable in Windows
      • wp-content/plugins/easydocs/vendor/symfony/console/Resources/bin/hiddeninput.exe
    • .bat - Batch File in Windows
      • wp-content/plugins/easydocs/vendor/bin/upgrade-carbon.bat
      • wp-content/plugins/easydocs/vendor/nesbot/carbon/bin/upgrade-carbon.bat
80,456 lines of code in 1,042 files:
LanguageFilesBlank linesComment linesLines of code
PHP86616,20645,06963,276
JavaScript131,0085115,792
JSON49003,206
XSD392482,803
CSS10337281,913
Markdown4777601,716
Blade116218680
XML26320592
C1528223
YAML7316104
reStructuredText1473048
m41111141
C/C++ Header112840
DOS Batch2008
SVG2008
Bourne Shell1316
SQL1010

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 159)
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity8.86
▷ Minimum class complexity1.00
▷ Maximum class complexity263.00
Average method complexity2.01
▷ Minimum method complexity1.00
▷ Maximum method complexity159.00
Code structure
Namespaces149
Interfaces133
Traits51
Classes578
▷ Abstract classes376.40%
▷ Concrete classes54193.60%
▷ Final classes40.74%
Methods6,361
▷ Static methods5348.39%
▷ Public methods4,93777.61%
▷ Protected methods1,19118.72%
▷ Private methods2333.66%
Functions674
▷ Named functions12718.84%
▷ Anonymous functions54781.16%
Constants145
▷ Global constants1611.03%
▷ Class constants12988.97%
▷ Public constants129100.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
6 compressed PNG files occupy 0.16MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png24.70KB24.45KB▼ 1.01%
assets/icon-128x128.png4.14KB4.31KB0.00%
assets/icon-256x256.png5.54KB6.09KB0.00%
assets/banner-772x250.png23.83KB25.01KB0.00%
assets/screenshot-2.png22.45KB22.99KB0.00%