84% wp-memory-usage

Code Review | WP-Memory-Usage

WordPress plugin WP-Memory-Usage scored84%from 54 tests.

About plugin

  • Plugin page: wp-memory-usage
  • Plugin version: 1.2.8
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.3
  • WordPress version: 6.3.1
  • First release: Jun 13, 2009
  • Latest release: Aug 10, 2023
  • Number of updates: 63
  • Update frequency: every 82.1 days
  • Top authors: berkux (80.95%)alexrabe (20.63%)

Code review

54 tests

User reviews

18 reviews

Install metrics

10,000+ active /203,708 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.16ms] Passed 4 tests

An overview of server-side resources used by WP-Memory-Usage
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.94 ▼10.08
Dashboard /wp-admin3.32 ▲0.0249.21 ▲4.33
Posts /wp-admin/edit.php3.36 ▲0.0149.20 ▼0.84
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.66 ▼9.74
Media Library /wp-admin/upload.php3.24 ▲0.0133.79 ▼3.98

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
can_compress_scripts
wpmemoryusage_emopt
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
wpmemoryusage_settings
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WP-Memory-Usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,950 ▲20413.39 ▼1.351.84 ▲0.0537.29 ▼1.45
Dashboard /wp-admin2,331 ▲1464.89 ▼0.00103.52 ▼7.6039.82 ▼0.25
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0439.52 ▲1.6035.65 ▼2.21
Add New Post /wp-admin/post-new.php1,534 ▲2023.24 ▲5.49573.92 ▼109.8162.74 ▲8.39
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.0594.96 ▼24.1940.51 ▼4.42

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
The following issues need your attention
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-memory-usage/wp-memory-usage.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
9 plugin tags: ip, memory-limit, adress, php, info...

wp-memory-usage/wp-memory-usage.php Passed 13 tests

The principal PHP file in "WP-Memory-Usage" v. 1.2.8 is loaded by WordPress automatically on each request
102 characters long description:
Show up memory limits, current memory usage, IP-Address, PHP-Version in the dashboard and admin footer

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin406 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP25022359
PO File1151547

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity79.00
▷ Minimum class complexity79.00
▷ Maximum class complexity79.00
Average method complexity10.75
▷ Minimum method complexity1.00
▷ Maximum method complexity53.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods562.50%
▷ Protected methods00.00%
▷ Private methods337.50%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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