100% aam-protected-media-files

Code Review | AAM Protected Media Files

WordPress plugin AAM Protected Media Files scored 100% from 54 tests.

About plugin

  • Plugin page: aam-protected-med...
  • Plugin version: 1.1.6
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-5.9.0
  • WordPress version: 5.9.2
  • First release: Nov 27, 2019
  • Latest release: Feb 12, 2022
  • Number of updates: 11
  • Update frequency: every 73.6 days
  • Top authors: vasyltech (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active / 3,963 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼0.02MB] [CPU: ▼299.47ms] Passed 4 tests

A check of server-side resources used by AAM Protected Media Files
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0155.93 ▲4.20
Dashboard /wp-admin3.41 ▲0.0033.03 ▼0.26
Posts /wp-admin/edit.php3.64 ▲0.0035.37 ▼4.14
Add New Post /wp-admin/post-new.php6.89 ▼0.0891.31 ▼1,188.75
Media Library /wp-admin/upload.php3.30 ▼0.0125.02 ▼4.73

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for AAM Protected Media Files
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4115.94 ▲0.166.17 ▼1.102.50 ▲0.26
Dashboard /wp-admin2,888 ▲306.15 ▲0.01116.81 ▼14.76151.51 ▼6.74
Posts /wp-admin/edit.php2,691 ▼33.23 ▼0.0165.53 ▲3.83136.50 ▲1.59
Add New Post /wp-admin/post-new.php1,719 ▼6922.67 ▲0.75410.71 ▼32.22170.12 ▲17.06
Media Library /wp-admin/upload.php1,698 ▼05.55 ▲0.00145.04 ▲1.08195.78 ▲9.95

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: documents, protected media, files, protected videos, media library

aam-protected-media-files/bootstrap.php 92% from 13 tests

The main PHP script in "AAM Protected Media Files" version 1.1.6 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("aam-protected-media-files.php" instead of "bootstrap.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin234 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP265260234

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity15.50
▷ Minimum class complexity9.00
▷ Maximum class complexity22.00
Average method complexity2.86
▷ Minimum method complexity2.00
▷ Maximum method complexity5.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods426.67%
▷ Public methods640.00%
▷ Protected methods640.00%
▷ Private methods320.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin