10% files-fence

Code Review | Files Fence

WordPress plugin Files Fence scored10%from 54 tests.

About plugin

  • Plugin page: files-fence
  • Plugin version: 0.1.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 1, 2022
  • Latest release: Aug 4, 2023
  • Number of updates: 15
  • Update frequency: every 18.4 days
  • Top authors: aixeiger (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /680 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/files-fence/src/Installation.php+20
    md5_file(.user.ini): failed to open stream: No such file or directory

Server metrics [RAM: ▲0.01MB] [CPU: ▲3.95ms] Passed 4 tests

This is a short check of server-side resources used by Files Fence
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.84 ▲1.27
Dashboard /wp-admin3.32 ▲0.0150.51 ▲4.17
Posts /wp-admin/edit.php3.37 ▲0.0152.73 ▲7.22
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.63 ▲5.65
Media Library /wp-admin/upload.php3.24 ▲0.0135.21 ▲4.72

Server storage [IO: ▲0.06MB] [DB: ▲0.79MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 18 new files
Database: 4 new tables, 9 new options
New tables
wp_filesfence_ignored
wp_filesfence_unknown
wp_filesfence_excluded
wp_filesfence_know
New WordPress options
db_upgraded
filesfence_search_main_files
widget_recent-posts
filesfence_wp_version
can_compress_scripts
widget_theysaidso_widget
filesfence_create
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Files Fence: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.72 ▲0.342.00 ▲0.4750.79 ▲7.76
Dashboard /wp-admin2,208 ▲285.63 ▼0.0599.66 ▲14.0148.22 ▲5.77
Posts /wp-admin/edit.php2,116 ▲161.98 ▼0.0439.05 ▲1.1847.00 ▲13.97
Add New Post /wp-admin/post-new.php1,539 ▲1323.18 ▼0.05694.37 ▲50.1261.18 ▲1.91
Media Library /wp-admin/upload.php1,410 ▲134.18 ▲0.0194.32 ▼0.7743.08 ▲0.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: files, checksum security, security, files integrity, files security

files-fence/filesfence.php 92% from 13 tests

"Files Fence" version 0.1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("files-fence.php" instead of "filesfence.php")

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
Success! There were no dangerous files found in this plugin950 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP15141272950

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity11.00
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods60
▷ Static methods915.00%
▷ Public methods5896.67%
▷ Protected methods00.00%
▷ Private methods23.33%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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
There were not PNG files found in your plugin