77% wp-elevator-asset-browser

Code Review | Elevator Asset Browser

WordPress plugin Elevator Asset Browser scored77%from 54 tests.

About plugin

  • Plugin page: wp-elevator-asset...
  • Plugin version: 0.1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 6.3.1
  • First release: May 4, 2017
  • Latest release: Oct 16, 2020
  • Number of updates: 13
  • Update frequency: every 97.0 days
  • Top authors: cmcfadden (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /746 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.14MB] [CPU: ▼5.49ms] Passed 4 tests

An overview of server-side resources used by Elevator Asset Browser
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.54 ▼4.15
Dashboard /wp-admin3.36 ▲0.0548.18 ▼1.69
Posts /wp-admin/edit.php3.47 ▲0.1152.10 ▲4.59
Add New Post /wp-admin/post-new.php5.23 ▼0.6661.17 ▼20.71
Media Library /wp-admin/upload.php3.26 ▲0.0337.19 ▲4.91
Elevator Asset Browser /wp-admin/options-general.php?page=elevatorasset3.2934.91

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
elevatorasset_global_settings
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Elevator Asset Browser
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,041 ▲30615.36 ▲0.775.56 ▲3.7744.33 ▼5.10
Dashboard /wp-admin2,367 ▲1796.65 ▲1.75134.04 ▲19.5742.79 ▼1.68
Posts /wp-admin/edit.php2,270 ▲1813.51 ▲1.5553.41 ▲17.1432.09 ▼1.92
Add New Post /wp-admin/post-new.php6,438 ▲4,90528.62 ▲5.29897.72 ▲243.1139.86 ▼21.19
Media Library /wp-admin/upload.php1,412 ▲244.36 ▲0.2482.61 ▼19.4840.76 ▼1.85
Elevator Asset Browser /wp-admin/options-general.php?page=elevatorasset1,1083.4945.8025.58

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • elevatorasset_global_settings
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-elevator-asset-browser/public/views/public.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/wp-elevator-asset-browser/admin/views/admin.php:15

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

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Donate link: Please fix this invalid url: ""
  • Tags: There were no tags found
Please take inspiration from this readme.txt

wp-elevator-asset-browser/elevatorasset.php 85% from 13 tests

The primary PHP file in "Elevator Asset Browser" version 0.1.9 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-elevator-asset-browser.php" instead of "elevatorasset.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin8,341 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
JSON2007,169
PHP9348492870
JavaScript67144222
CSS321580

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity26.75
▷ Minimum class complexity11.00
▷ Maximum class complexity69.00
Average method complexity2.51
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods68
▷ Static methods710.29%
▷ Public methods6291.18%
▷ Protected methods00.00%
▷ Private methods68.82%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png11.50KB5.06KB▼ 56.00%