67% front-end-managed-files-block

Code Review | Front-End Managed Files Block

WordPress plugin Front-End Managed Files Block scored67%from 54 tests.

About plugin

  • Plugin page: front-end-managed...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.4
  • WordPress version: 6.3.1
  • First release: Jul 16, 2020
  • Latest release: Jul 16, 2020
  • Number of updates: 7
  • Update frequency: every 0.6 days
  • Top authors: pixelhound (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /617 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: ▲0.56MB] [CPU: ▲1.07ms] Passed 4 tests

Server-side resources used by Front-End Managed Files Block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.03 ▲0.5747.10 ▲6.57
Dashboard /wp-admin3.86 ▲0.5549.03 ▼3.79
Posts /wp-admin/edit.php3.97 ▲0.6153.18 ▲4.12
Add New Post /wp-admin/post-new.php6.47 ▲0.58100.47 ▼2.61
Media Library /wp-admin/upload.php3.78 ▲0.5543.78 ▲10.13

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 156 new files
Database: 2 new tables, 7 new options
New tables
wp_frontend_managed_files_block_files
wp_frontend_managed_files_block_configurations
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
frontend_managed_files_block_db_version
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Front-End Managed Files Block
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲17513.80 ▼0.599.76 ▲7.8843.02 ▲4.09
Dashboard /wp-admin2,211 ▲234.86 ▼0.0498.46 ▼10.9641.02 ▲1.69
Posts /wp-admin/edit.php2,088 ▼42.06 ▲0.0439.99 ▼0.0436.71 ▲2.09
Add New Post /wp-admin/post-new.php6,447 ▲4,91428.45 ▲5.23911.76 ▲286.7638.69 ▼19.25
Media Library /wp-admin/upload.php1,390 ▲54.26 ▲0.0395.00 ▼11.9140.31 ▼5.87

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_frontend_managed_files_block_files
    • wp_frontend_managed_files_block_configurations
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • frontend_managed_files_block_db_version
    • 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/front-end-managed-files-block/public/views/file.blade.php
    • > /wp-content/plugins/front-end-managed-files-block/public/views/error.blade.php
    • > /wp-content/plugins/front-end-managed-files-block/public/views/file-list.blade.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Trait 'eftec\\bladeone\\BladeOneHtml' not found in wp-content/plugins/front-end-managed-files-block/vendor/BladeOne-3.45.1/lib/BladeOneHtmlBootstrap.php on line 30

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 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:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
Please take inspiration from this readme.txt

front-end-managed-files-block/frontend-managed-files-block.php 77% from 13 tests

The primary PHP file in "Front-End Managed Files Block" version 1.0.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("front-end-managed-files-block.php" instead of "frontend-managed-files-block.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 150 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 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin6,274 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP187452,6043,566
JavaScript72024121,988
Markdown72140533
CSS213066
JSON10063
Blade316042
XML17116

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity32.50
▷ Minimum class complexity1.00
▷ Maximum class complexity271.00
Average method complexity2.16
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces1
Interfaces0
Traits6
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods360
▷ Static methods133.61%
▷ Public methods18250.56%
▷ Protected methods14440.00%
▷ Private methods349.44%
Functions17
▷ Named functions317.65%
▷ Anonymous functions1482.35%
Constants6
▷ Global constants116.67%
▷ Class constants583.33%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
105 compressed PNG files occupy 0.08MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/pl.png0.85KB0.80KB▼ 6.08%
public/images/odt.png0.56KB0.51KB▼ 9.19%
public/images/odg.png0.77KB0.72KB▼ 6.73%
public/images/html.png0.73KB0.68KB▼ 7.09%
public/images/xml.png0.46KB0.41KB▼ 11.79%