90% filebird-document-library

Code Review | FileBird Document Library

WordPress plugin FileBird Document Library scored90%from 54 tests.

About plugin

  • Plugin page: filebird-document...
  • Plugin version: 1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Jun 29, 2022
  • Latest release: Oct 16, 2023
  • Number of updates: 16
  • Update frequency: every 29.6 days
  • Top authors: ninjateam (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

2,000+ active /9,147 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.52ms] Passed 4 tests

Server-side resources used by FileBird Document Library
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /38.79 ▲35.287,283,998.83 ▲7,283,958.54
Dashboard /wp-admin3.36 ▼0.0351.77 ▼17.83
Posts /wp-admin/edit.php3.41 ▲0.0151.34 ▲0.18
Add New Post /wp-admin/post-new.php5.94 ▲0.0188.04 ▼14.28
Media Library /wp-admin/upload.php3.28 ▲0.0143.48 ▲5.87

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 56 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for FileBird Document Library
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲2814.35 ▼0.001.83 ▼0.2940.29 ▼2.40
Dashboard /wp-admin2,202 ▲255.53 ▼0.1281.59 ▼7.9041.70 ▲0.93
Posts /wp-admin/edit.php2,110 ▲102.15 ▲0.1836.53 ▲0.7638.30 ▲4.61
Add New Post /wp-admin/post-new.php1,536 ▲823.17 ▼0.19685.26 ▼0.1552.62 ▼7.75
Media Library /wp-admin/upload.php1,410 ▲74.10 ▼0.12111.50 ▲6.9348.75 ▲0.15

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • 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 everything seems fine, this is not an exhaustive test

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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% 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
6 plugin tags: document library, document gallery, wordpress pdf download plugin, wordpress document library, wordpress ebook plugin...

filebird-document-library/filebird-document-library.php 92% from 13 tests

The main PHP file in "FileBird Document Library" ver. 1.9 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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 detected3,399 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
JSON20001,938
PO File7336454848
PHP46916373
SVG1008235
JavaScript3003
CSS2102

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity6.00
▷ Minimum class complexity2.00
▷ Maximum class complexity10.00
Average method complexity1.21
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1280.00%
▷ Protected methods320.00%
▷ Private methods00.00%
Functions7
▷ Named functions342.86%
▷ Anonymous functions457.14%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin