78% remove-media-library

Code Review | Remove Media Library for WordPress

WordPress plugin Remove Media Library for WordPress scored78%from 54 tests.

About plugin

  • Plugin page: remove-media-library
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.1.1
  • WordPress version: 6.3.1
  • First release: Feb 12, 2019
  • Latest release: Mar 24, 2019
  • Number of updates: 6
  • Update frequency: every 8.0 days
  • Top authors: webstilo (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /1,777 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
This plugin's installer ran successfully

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

An overview of server-side resources used by Remove Media Library for WordPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.83 ▼5.66
Dashboard /wp-admin3.33 ▲0.0245.66 ▼0.28
Posts /wp-admin/edit.php3.38 ▲0.0246.02 ▲1.08
Add New Post /wp-admin/post-new.php5.93 ▲0.0488.07 ▲2.66
Media Library /wp-admin/upload.php3.25 ▲0.0237.66 ▲3.13

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Remove Media Library for WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,903 ▲14613.57 ▼0.865.25 ▲3.2943.32 ▼7.24
Dashboard /wp-admin2,229 ▲414.90 ▼0.02101.12 ▼8.3639.43 ▼6.47
Posts /wp-admin/edit.php2,109 ▲202.04 ▼0.0040.66 ▲6.9134.84 ▼2.32
Add New Post /wp-admin/post-new.php1,530 ▲1117.42 ▼5.55644.25 ▼25.5266.20 ▲5.25
Media Library /wp-admin/upload.php1,402 ▲144.25 ▲0.0695.95 ▼3.7841.27 ▲0.21

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 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
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/remove-media-library/public/partials/remove-media-library-public-display.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/remove-media-library/admin/partials/remove-media-library-admin-display.php:23

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (13 tag instead of maximum 10)
You can look at the official readme.txt

remove-media-library/remove-media-library.php Passed 13 tests

"Remove Media Library for WordPress" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
46 characters long description:
Remove all media from WordPress Media Library.

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
Success! There were no dangerous files found in this plugin956 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12191565586
CSS2308198
PO File13439106
JavaScript2103266

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity6.71
▷ Minimum class complexity1.00
▷ Maximum class complexity38.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods34
▷ Static methods25.88%
▷ Public methods2985.29%
▷ Protected methods00.00%
▷ Private methods514.71%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin