90% dg-real-media-library

Code Review | Document Gallery for Real Media Library

WordPress plugin Document Gallery for Real Media Library scored90%from 54 tests.

About plugin

  • Plugin page: dg-real-media-lib...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 6.3.1
  • First release: May 14, 2017
  • Latest release: Mar 27, 2020
  • Number of updates: 13
  • Update frequency: every 80.7 days
  • Top authors: mguenter (84.62%)devowl (23.08%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /5,051 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

A check of server-side resources used by Document Gallery for Real Media Library
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.97 ▼7.68
Dashboard /wp-admin3.31 ▲0.0048.64 ▼5.10
Posts /wp-admin/edit.php3.36 ▲0.0047.64 ▼2.75
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.07 ▼2.30
Media Library /wp-admin/upload.php3.23 ▲0.0035.48 ▲0.69

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Document Gallery for Real Media Library
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4514.73 ▲0.521.55 ▼0.2339.19 ▼8.01
Dashboard /wp-admin2,215 ▲355.64 ▲0.0292.19 ▼6.3041.11 ▼3.03
Posts /wp-admin/edit.php2,118 ▲182.01 ▲0.0540.81 ▲4.1036.07 ▼0.13
Add New Post /wp-admin/post-new.php1,549 ▲2118.31 ▼4.74605.42 ▼95.7674.15 ▲16.09
Media Library /wp-admin/upload.php1,417 ▲174.22 ▼0.03103.83 ▲6.5243.10 ▲0.75

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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

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

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
7 plugin tags: files, thumbnails, real media library, document, gallery...

dg-real-media-library/index.php 92% from 13 tests

Analyzing the main PHP file in "Document Gallery for Real Media Library" version 1.0.0
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("dg-real-media-library.php" instead of "index.php")

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
Everything looks great! No dangerous files found in this plugin55 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1162055

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.94
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin