79% wpmm-memory-meter

Code Review | Memory Meter

WordPress plugin Memory Meter scored79%from 54 tests.

About plugin

  • Plugin page: wpmm-memory-meter
  • Plugin version: 1.3.3
  • PHP compatiblity: 7.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Mar 12, 2022
  • Latest release: Sep 19, 2023
  • Number of updates: 11
  • Update frequency: every 50.9 days
  • Top authors: ninetyninew (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /2,884 total downloads

Benchmarks

Plugin footprint 65% 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: ▲5.07MB] [CPU: ▲22.23ms] 75% from 4 tests

Server-side resources used by Memory Meter
The following require your attention
  • Extra RAM: Extra memory usage should kept under 5MB (currently 5.07MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.00 ▲5.4971.89 ▲28.03
Dashboard /wp-admin9.02 ▲5.6381.65 ▲15.91
Posts /wp-admin/edit.php9.02 ▲5.6276.98 ▲23.96
Add New Post /wp-admin/post-new.php9.46 ▲3.54117.00 ▲21.02
Media Library /wp-admin/upload.php9.02 ▲5.7572.81 ▲37.95
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius9.0268.30

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 199 new files
Database: no new tables, 10 new options
New WordPress options
db_upgraded
fs_active_plugins
widget_recent-posts
fs_accounts
wpmm_memory_meter_logs_latest
can_compress_scripts
widget_theysaidso_widget
fs_debug_mode
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Memory Meter
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,054 ▲30813.48 ▼0.7510.12 ▲8.5230.63 ▼12.44
Dashboard /wp-admin2,274 ▲975.75 ▲0.0792.05 ▲0.2943.62 ▲2.72
Posts /wp-admin/edit.php2,184 ▲812.05 ▲0.0239.08 ▲3.1634.36 ▲0.05
Add New Post /wp-admin/post-new.php1,579 ▲5322.56 ▼0.70685.93 ▲62.5054.52 ▼0.15
Media Library /wp-admin/upload.php1,483 ▲834.29 ▲0.12101.43 ▼5.8350.69 ▲8.33
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius1,1352.1026.6628.15

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/wpmm-memory-meter/freemius/includes/class-freemius.php+8515
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 10 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • fs_debug_mode
    • fs_accounts
    • widget_theysaidso_widget
    • fs_active_plugins
    • wpmm_memory_meter_logs_latest

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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)
No browser errors were detected

Optimizations

Plugin configuration Passed 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
6 plugin tags: memory, ram, memory limit, memory usage, memory meter...

wpmm-memory-meter/wpmm-memory-meter.php Passed 13 tests

The main file in "Memory Meter" v. 1.3.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
24 characters long description:
WordPress Plugin by 99w.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected34,105 lines of code in 145 files:
LanguageFilesBlank linesComment linesLines of code
PHP1188,04617,24733,671
JavaScript74865211
Sass2156142
XML29355
CSS150215
JSON10011

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,088)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity92.41
▷ Minimum class complexity1.00
▷ Maximum class complexity3,088.00
Average method complexity4.59
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes49
▷ Abstract classes24.08%
▷ Concrete classes4795.92%
▷ Final classes00.00%
Methods1,273
▷ Static methods19815.55%
▷ Public methods88369.36%
▷ Protected methods171.34%
▷ Private methods37329.30%
Functions99
▷ Named functions99100.00%
▷ Anonymous functions00.00%
Constants146
▷ Global constants9967.81%
▷ Class constants4732.19%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/wpmm-memory-meter.png36.15KB23.46KB▼ 35.11%