74% assets-manager

Code Review | Assets Manager

WordPress plugin Assets Manager scored74%from 54 tests.

About plugin

  • Plugin page: assets-manager
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.7
  • WordPress version: 6.3.1
  • First release: Jan 12, 2014
  • Latest release: Nov 29, 2016
  • Number of updates: 35
  • Update frequency: every 30.1 days
  • Top authors: jackreichert (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /7,353 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼6.22ms] Passed 4 tests

Analyzing server-side resources used by Assets Manager
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.23 ▼5.31
Dashboard /wp-admin3.35 ▲0.0544.67 ▼1.65
Posts /wp-admin/edit.php3.40 ▲0.0542.42 ▼4.94
Add New Post /wp-admin/post-new.php5.93 ▲0.0577.16 ▼12.97
Media Library /wp-admin/upload.php3.27 ▲0.0432.78 ▲0.46
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=asset3.2732.05
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=asset3.2632.72
Add New /wp-admin/post-new.php?post_type=asset3.4158.67
Assets Manager /wp-admin/edit.php?post_type=asset3.3337.25

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 13 new files
Database: 1 new table, 7 new options
New tables
wp_assets_log
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
category_children

Browser metrics Passed 4 tests

An overview of browser requirements for Assets Manager
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6614.45 ▲0.101.78 ▲0.1841.61 ▲2.95
Dashboard /wp-admin2,224 ▲445.55 ▼0.1682.02 ▼8.1937.65 ▼6.22
Posts /wp-admin/edit.php2,135 ▲352.03 ▲0.0933.61 ▼6.6933.09 ▼4.46
Add New Post /wp-admin/post-new.php1,555 ▲2923.16 ▼0.34679.52 ▲27.9250.11 ▼11.78
Media Library /wp-admin/upload.php1,435 ▲354.22 ▼0.0597.14 ▲4.2645.40 ▲4.56
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=asset1,3542.1231.0931.21
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=asset1,4902.1327.3931.16
Add New /wp-admin/post-new.php?post_type=asset2,4597.83177.7961.37
Assets Manager /wp-admin/edit.php?post_type=asset1,1451.9729.9831.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_assets_log
  • The uninstall procedure has failed, leaving 7 options in the database
    • category_children
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/assets-manager/wp-assets-manager.php:47

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

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: admin, content, links, share file, asset management...

assets-manager/wp-assets-manager.php 92% from 13 tests

"Assets Manager" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("assets-manager.php" instead of "wp-assets-manager.php")

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
There were no executable files found in this plugin1,114 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP10182435741
JavaScript1317352
CSS11021

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity6.90
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity1.61
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods97
▷ Static methods22.06%
▷ Public methods5758.76%
▷ Protected methods11.03%
▷ Private methods3940.21%
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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin