89% jvm-protected-media

Code Review | JVM Protected Media

WordPress plugin JVM Protected Media scored89%from 54 tests.

About plugin

  • Plugin page: jvm-protected-media
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.1-6.0.2
  • WordPress version: 6.3.1
  • First release: Feb 21, 2018
  • Latest release: Sep 28, 2022
  • Number of updates: 17
  • Update frequency: every 98.8 days
  • Top authors: jorisvanmontfort (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,026 total downloads

Benchmarks

Plugin footprint 82% from 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.04MB] [CPU: ▼5.38ms] Passed 4 tests

Analyzing server-side resources used by JVM Protected Media
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0535.04 ▼5.44
Dashboard /wp-admin3.35 ▲0.0446.10 ▼8.77
Posts /wp-admin/edit.php3.46 ▲0.1045.82 ▼1.94
Add New Post /wp-admin/post-new.php5.93 ▲0.0498.77 ▼5.38
Media Library /wp-admin/upload.php3.27 ▲0.0439.50 ▲1.03

Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Just a few items left to fix
  • Illegal file modification found: 1 file (0.68KB) outside of "wp-content/plugins/jvm-protected-media/" and "wp-content/uploads/"
    • (modified) .htaccess
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for JVM Protected Media
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.20 ▼1.561.99 ▲0.0949.07 ▲5.52
Dashboard /wp-admin2,221 ▲185.85 ▼0.02108.38 ▼14.5838.25 ▼12.32
Posts /wp-admin/edit.php2,100 ▲212.05 ▼0.0039.69 ▲2.8838.42 ▲6.68
Add New Post /wp-admin/post-new.php1,547 ▲1623.20 ▼0.11606.54 ▼198.1759.52 ▼9.48
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.11112.78 ▼7.1049.25 ▲0.78

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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
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

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: protection, attachments, files, media, protect...

jvm-protected-media/jvm-protected-media.php 92% from 13 tests

"JVM Protected Media" version 1.0.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected195 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP164100195

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods847.06%
▷ Public methods1482.35%
▷ Protected methods00.00%
▷ Private methods317.65%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants6
▷ Global constants6100.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
No PNG files were detected