94% memory-usage-bar

Code Review | Memory Usage Bar

WordPress plugin Memory Usage Bar scored 94% from 54 tests.

About plugin

  • Plugin page: memory-usage-bar
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Jan 19, 2018
  • Latest release: Jan 19, 2018
  • Number of updates: 4
  • Update frequency: every 6.0 days
  • Top authors: ayangyuan (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

800+ active / 4,333 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼147.45ms] Passed 4 tests

A check of server-side resources used by Memory Usage Bar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1332.14 ▲10.82
Dashboard /wp-admin3.08 ▲0.0347.04 ▼3.42
Posts /wp-admin/edit.php3.17 ▲0.0642.27 ▼4.37
Add New Post /wp-admin/post-new.php5.44 ▲0.0088.70 ▼582.13
Media Library /wp-admin/upload.php3.02 ▲0.0232.94 ▲0.12

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Memory Usage Bar
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,731 ▲13515.88 ▲0.2710.26 ▼0.4548.38 ▲0.92
Dashboard /wp-admin2,995 ▲615.90 ▼0.06151.22 ▼1.48114.74 ▲0.98
Posts /wp-admin/edit.php2,767 ▲282.71 ▼0.0171.07 ▲0.1083.86 ▼9.54
Add New Post /wp-admin/post-new.php1,689 ▲10818.80 ▼0.46386.32 ▼1.40110.20 ▲4.15
Media Library /wp-admin/upload.php1,838 ▲315.04 ▼0.00148.33 ▼16.14111.95 ▼8.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/memory-usage-bar/memory-usage-bar.php:27

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: memory, memory-limit, admin, server, memory limit...

memory-usage-bar/memory-usage-bar.php 92% from 13 tests

The main PHP script in "Memory Usage Bar" version 1.0.2 is automatically included on every request by WordPress
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/res/lang" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin66 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP152566

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.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 were not PNG files found in your plugin